Ubuntu – How to clean up unnecessary files

hard drive

Please suggest me any particular unnecessary file that I can clean to back everything to normal condition(temporarily). (i.e. any log or archieve or anything ). My var/log has only 40MB and Home directory has 3GB of space(so I believe that's not a problem). Other than that what I can clean up to make space.

[user@host]$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_inamivm-lv_root
                       18G   17G     0 100% /
tmpfs                 1.9G     0  1.9G   0% /dev/shm
/dev/sda1             485M   71M  389M  16% /boot

Best Answer

To clean some packages laying around, run the following:

sudo apt-get autoremove
sudo apt-get clean
sudo apt-get autoclean

If you are in search for a more in depth cleaning, use the Ubuntu Tweak Utility.

Install


The Ubuntu Tweak Stable PPA by Ding Zhou, support Ubuntu 7.10 till 14.04.

sudo add-apt-repository ppa:tualatrix/ppa
sudo apt-get update
sudo apt-get install ubuntu-tweak

Usage


Click the janitor tab, select what you want to scan, check what you want to delete, and then press the clean button to cleanse your system.

ubuntu-tweak-janitor

Related Question