October 31, 2008 · General, Package Mgmt, Server · Email This Post

Sponsored Link
Ubucleaner is a simple bash script that help you to keep your computer clean.

Note:- This is Only for advanced Ubuntu users

Ubucleaner Features

-- 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

wget http://www.opendesktop.org/CONTENT/content-files/71529-ubucleaner.sh

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

./71529-ubucleaner.sh

Sponsored Link

Incoming search terms:

Related posts

21 Comments to “Ubucleaner – Simple bash script to keep your Ubuntu System Clean”

  1. likemindead says:

    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.

    [Reply]

  2. Dvergeylen says:

    Hello.

    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.

    Enjoy!

    Daniel V.

    [Reply]

  3. admin says:

    @Dvergeylen

    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

    [Reply]

  4. steven says:

    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

    thanks

    [Reply]

  5. F@bio says:

    Thanks….

    Great script!

    [Reply]

  6. Dvergeylen says:

    Hello Again.

    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.

    Daniel V.

    [Reply]

  7. admin says:

    @Dvergeylen

    Thanks for the followup

    [Reply]

  8. tuxcayc says:

    Pretty useful, thanks.

    [Reply]

  9. Predatorian says:

    if i use apt-get, it would be the same command, just leave the aptitude in the script, or how would i edit that?

    [Reply]

  10. I would be happy to translate the script to English if it is moved to Launchpad.

    [Reply]

  11. Havilson Peixoto says:

    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,

    Havilson

    [Reply]

  12. yurek says:

    Hi,
    http://doc.ubuntu-fr.org/maintenir_systeme is now available in english ( draft ). Can you test it and send me corrections ?
    Thanks.

    step :
    add :
    deb http://scriptsbash.xdir.org/apt/ intrepid universe

    sudo apt-get update

    sudo apt-get install maintenir-systeme

    Applications / System Tools / Maintenir Systeme

    [Reply]

  13. Hi Yurek
    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)

    Regards

    Jonathan

    [Reply]

  14. Mason says:

    Just FYI, to execute the script it should be

    sudo ./71529-ubucleaner.sh

    I’m sure everyone can figure that out, but I think it should be changed so the tutorial is accurate.

    [Reply]

  15. Rob Kingston says:

    Brilliant! Worked as smoothly as anything. Nothing like a fresh Ubuntu for the New Year.

    Ditto what Mason says.

    [Reply]

  16. Danny Tatom 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…
    Script Finished!

    [Reply]

  17. fahrur says:

    Thanks..Thanks…Thanks…Thanks…Thanks..Thanks..Thanks…

    [Reply]

  18. Andrew Z. says:

    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.

    [Reply]

  19. phants says:

    THANKS!!!

    [Reply]

  20. Joan says:

    Hi!

    I’m a Bleachbit user and it’s awesome. A great app!!

    Thanks!

    Joan

    [Reply]

  21. pi4r0n says:

    Hello ALL

    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.

    Kind Regards,

    pi4r0n

    [Reply]

Leave a Reply