How safe is Ubuntu tweak's Janitor?

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/cache/apt/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.


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.