Monday, November 2, 2009

Ubuntu Linux: clean cached apt archives to free up disk space

If you are using Ubuntu or other Debian like Linux, you may notice each upgrade or update may eat up some of your disk space -- depending on your setup. That is because all the update packages you have downloaded are kept under the directory of /var/cache/apt/archives.

From time to time, you could run command:
        sudo apt-get clean
to remove all those downloaded packages.

If you only want to remove the useless old packages, you can use command:
        sudo apt-get autoclean

You can also do it with the graphic tool Synaptic Package Manager. Click its menu Settings|Preferences. In the pop-up Preferences dialog, select Files tab. Under the Temporary Files section, choose what you want to delete and click the Delete Cached Package Files button.

No comments:

Post a Comment