Ubucleaner – Simple bash script to keep your Ubuntu System Clean
Note:- This is Only for advanced Ubuntu users
-- Clean apt cache
-- Remove config files left from uninstalled .deb packages(it happens if you don't use the
--purge switch with apt-get)
-- Remove every kernel except the one you are using
-- Empty the trashes of every user(including root)
It uses apt and the kernel removing thing searches for ubuntu-only packages, so it can't work on non-debian system and the result is undetermined for other debian-based system, but you can still use the other features of the script(you'll just have to comment the parts you don't want).
The script assumes that you are using the text-based Aptitude application, rather than apt-get and dpkg. If you are not using Aptitude, you should also replace the reference to aptitude clean with apt-get clean and the reference to aptitude purge to dpkg --purge.This can be done done by editing the following script.
First you need to download the script from here or using the following command
Now you should have 71529-ubucleaner.sh file you need to give execute permissions using the following command
sudo chmod +x 71529-ubucleaner.sh
Run the script using the following command
How much of an impact can Ubucleaner have? On a scale of 1 to 10, how important would you rate it?
Great site. I always enjoy your posts. Keep up the great work.
I’m one of the autors of a similar script, but a little more advanced (but it’s in french).
See more features on : http://doc.ubuntu-fr.org/maintenir_systeme.
It’s very easy to use (you have to select the task you want to be done) and it will do it for you. It’s obviously totally under GPL licence so you can re-use the bash script.
Really Nice script.Is there anyway you can provide english version of this so that we can write tutorial about that.
Thanks for your nice script
Yes, I think it is a good work, but it is in France ? Can they change it to English please ?
then… is this script work for Ubuntu Intrepid Ibex ???
Please Ubuntugeek.com, if there is similar script like this, can you post the article OK ? good work… well done
I’ll contact the other authors to translate the script in English. We’ll probably improve it a bit to allow translations in many other languages (e.g: one file of code and one file of Strings wich can be translated). I think that once the base will be correct, other translations will follow.
I’ll give you more information on this thread as soon as possible.
Thanks for the followup
Pretty useful, thanks.
if i use apt-get, it would be the same command, just leave the aptitude in the script, or how would i edit that?
I would be happy to translate the script to English if it is moved to Launchpad.
Hey, since I’ve used ubucleaner I couldn’t load HAL anymore. The only problem is erlated to the ethernet card that is no more operational. It’s a inboard ethernet card, all of the rest (the nvidia driver and compiz for example) are working well, any ideas on how to fix it?
Thanks and best regards,
http://doc.ubuntu-fr.org/maintenir_systeme is now available in english ( draft ). Can you test it and send me corrections ?
deb http://scriptsbash.xdir.org/apt/ intrepid universe
sudo apt-get update
sudo apt-get install maintenir-systeme
Applications / System Tools / Maintenir Systeme
I have made some corrections to the english version of the script and the language file is now ready to go. Can I email it to you?
You can contact me at jonolumb [[((at))]] gmail.com (remove both brackets)
Just FYI, to execute the script it should be
I’m sure everyone can figure that out, but I think it should be changed so the tutorial is accurate.
Brilliant! Worked as smoothly as anything. Nothing like a fresh Ubuntu for the New Year.
Ditto what Mason says.
I use apt-get, so edited aptitude purge to dpkg -purge like stated above, and get this when running it:
Removing old kernels…
dpkg: need an action option
Type dpkg –help for help about installing and deinstalling packages [*];
Use `dselect’ or `aptitude’ for user-friendly package management;
Type dpkg -Dhelp for a list of dpkg debug flag values;
Type dpkg –force-help for a list of forcing options;
Type dpkg-deb –help for help about manipulating *.deb files;
Type dpkg –license|–licence for copyright licence and lack of warranty (GNU GPL) [*].
Options marked [*] produce a lot of output – pipe it through `less’ or `more’ !
Emptying every trashes…
You may also like BleachBit which can remove hundreds of MBs from your system. I wrote BleachBit and plan to add features like this script has.
I’m a Bleachbit user and it’s awesome. A great app!!
I would like to raise kind of a bug with this script and would appreciate if the owner of it could have a look at it and fix it 🙂
Few weeks ago I have manually upgraded to new version of ALSA divers. All was fine (sound in speakers was ok suboffer as well evan my mic was working) until I run this script (71529-ubucleaner.sh) Then I have noticed that mic stop working. The reason for that was that some of the files (mic module – dont know which one) was deleted.
Could someone have a look at this issue and try to avoid deleting alsa files.