place to discuss Linux
How to Keep Your Ubuntu System Clean
If you are an geeky user who keeps installing various software and updates then with the passage of time you will feel that your system is messed up. Ubucleaner is a shell script which lets you clean your Ubuntu system by removing the following:
- apt cache
- Config file for Uninstalled .deb packages
- Unused Kernels
First lets discuss the different items which this script removes.
APT Cache
APT is the package management tool which is used to install/upgrade and remove packages in your Ubuntu system. If you use it often then it’s cache consumes a lot of space. By removing the apt cache you get plenty of free space.
Config Files For Uninstalled .Deb packages
Suppose you downloaded a package for any software and it did not work. Many users forget to delete such packages. The Ubucleaner takes care of such packages and throws them out of the system.
Unused Kernel
There could be more than one kernel present in your system at the same time. But only one will be functional. This script gets rid of all unused kernels to free up system space and keep your system neat and clean.
How To Use The Ubucleaner
Its very simple, open the terminal and run the following two commands sequentially:
wget http://www.opendesktop.org/CONTENT/content-files/71529-ubucleaner.sh
sudo chmod +x 71529-ubucleaner.sh
That’s it, now run the script with the following command and it will take care of all the things mentioned above:
sh 71529-ubucleaner.sh
Enjoy!
| Print article | This entry was posted by Ashik on January 20, 2010 at 12:19 am, and is filed under Tutorials, Ubuntu. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |



about 6 months ago
Great script! Here a couple of my suggestions -
a) use install(1) to put script into /usr/sbin -
install -p -o root -g root ./71529-ubucleaner.sh /usr/sbin/
b) incorporate deborphan, I use the following to show what could be removed …
deborphan -Pz
Cheers,
- frank
about 6 months ago
Great Script! I have added most of it to my own script. Check it out. Leave Feedback.
http://sourceforge.net/projects/bleedingedge/
I hope that you don’t mind. I didn’t see an author or license attached to 71529-ubucleaner.sh.
Sincerely,
Paul Fedele