Ubuntu Tweak Janitor source code commands

Ubuntu Tweak Janitor source code commands

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

sudo apt-get clean

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

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

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

rm -rf ~/.googleearth/*

rm -rf ~/.cache/gwibber/

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

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

rm -rf ~/.opera/cache/*

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.

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

rm -rf ~/.thumbnails/*

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

Source: reddit.com