Sunday, April 28, 2024
20
rated 0 times [  20] [ 0]  / answers: 1 / hits: 5214  / 2 Years ago, mon, february 14, 2022, 2:11:27

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


More From » ubuntu-tweak

 Answers
1

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.


[#33431] Wednesday, February 16, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
wherejuic

Total Points: 53
Total Questions: 123
Total Answers: 117

Location: Zambia
Member since Mon, Jan 23, 2023
1 Year ago
;