How to Free Ubuntu Disk Space

Source : SaraAdd time : Sep 15, 2010Category: Linux > System

Overview: Ubuntu is one of the popular Linux systems. During using it, it may have some cache create. Do you want to clean out it? The following tutorial will guide you to free your disk space for Ubuntu, including Ubuntu 10.04, and the latest Ubuntu 10.10.

ubuntu disk space, ubuntu cache clean, ubuntu guide, ubuntu 10.04, ubuntu 10.10

Software you’ll need :

1. Check Space Used by Cached Files on Ubuntu

a. Go to /var/cache/apt/archives folder, or you can use the command below from prompt:
du - sh /var/cache/apt/archives

Free Ubuntu Disk Space - Check Space

b. There will be much space used-on the testing box, and you will how much space used by Cached Files on Ubuntu.

2. Clean out Ubuntu Cached Package

Run the following command from the prompt to clean out the folder properly:
sudo apt-get clean

Note: If you deleted the files manually, it may be a mistake since the lock file and the blank partial directory are supposed to stay there - and it's less keystrokes to type this anyway.

3. Disable Ubuntu Automatic Package Caching

If you'd rather not have to go in and clean out the cache folders all the time, you can tell Ubuntu to stop keeping them around with a simple configuration change.

a. Go to System -> Administration -> Synaptic Package Manager.
b. Choose Settings -> Preferences
c. Switch to the Files tab, and change the option to "Delete downloaded packages after installation" to prevent the caching entirely.

Free Ubuntu Disk Space - Disable Ubuntu Automatic Package Caching

You'll also notice that you can use the Delete Cached Package Files button from this screen to clean up the packages.