Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

On Ubuntu Tweak, it says that Janitor can be run to free up some disk space. Is this safe? I am running 12.04.

share|improve this question

2 Answers 2

up vote 12 down vote accepted

I know you already got your answer, but I somewhat recently went through ubuntu-tweak's source (when it was announced that it wasn't going to be developed any longer) and translated everything that it did to the equivalent in bash. If you're interested to know, Ubuntu Tweak does nearly exactly:

  1. sudo rm -rf /var/apt/cache/archives/*.deb

  2. sudo apt-get clean

  3. rm -rf ~/.cache/google-chrome/Default/*

  4. rm -rf ~/.cache/chromium/Default/*

  5. rm -rf ~/.cache/telepathy/Cache*

  6. rm -rf ~/.googleearth/*

  7. rm -rf ~/.cache/gwibber/

  8. while read -r line; do if [[ "$line" == Path=* ]]; then rm -rf ~/.mozilla/firefox/${line:5}/Cache/*; rm -rf ~/.mozilla/firefox/${line:5}/OfflineCache/*; fi; done < ~/.mozilla/firefox/profiles.ini

  9. while read -r line; do if [[ "$line" == Path=* ]]; then rm -rf ~/.thunderbird/${line:5}/Cache/*; rm -rf ~/.thunderbird/${line:5}/OfflineCache/*; fi; done < ~/.thunderbird/profiles.ini

  10. rm -rf ~/.opera/cache/*

  11. dpkg --list |grep "^rc" | cut -d " " -f 3 | xargs sudo dpkg --purge //this one may be dangerous. only run if you know what it's doing.

  12. rm -rf ~/.cache/software-center/*

  13. rm -rf ~/.thumbnails/*

  14. dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge

And here's a link to my original comment on the matter from reddit.

share|improve this answer

Yes of course , It cleans unused files such as caches for apt tool , cache for browser and so on , but if you back up your downloaded programs with APT on CD Application don't clean apt cache. if you clean apt cache you can not back up programs with APT on CD Tool.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.