[STICKY] Clean, update & upgrade your system

[STICKY] Clean, update & upgrade your system

Postby blfriis » Wed Nov 12, 2014 2:12 am

Hi everyone here's a couple of commands I use for cleaning and updating my system. Maybe they're already in the forum, if so you can just delete this post.
Use this command for cleaning and updating your system, it doesn't remove or update the kernels.
Code: Select all
sudo dpkg --configure -a && sudo apt-get check -y && sudo apt-get autoremove -y --force-yes && sudo apt-get clean -y --force-yes && sudo rm -rf $HOME/.local/share/Trash/files && sudo rm -rf ~/.evolution/mail/local/folders.db && sudo find ~/.thumbnails -type f -exec rm {} \; && sudo rm -rf /var/log/*.gz && sudo updatedb && sudo apt-get update -y && sudo apt-get upgrade -y --force-yes


If you want to remove old kernels too, then use this one.
Code: Select all
sudo dpkg --configure -a && sudo apt-get check -y && sudo apt-get autoremove -y --force-yes && sudo apt-get clean -y --force-yes && sudo rm -rf $HOME/.local/share/Trash/files && sudo rm -rf ~/.evolution/mail/local/folders.db && sudo find ~/.thumbnails -type f -exec rm {} \; && sudo rm -rf /var/log/*.gz && sudo updatedb && sudo apt-get update -y && sudo apt-get upgrade -y --force-yes && sudo apt-get purge $(dpkg -l linux-{image,headers}-"[0-9]*" | awk '/ii/{print $2}' | grep -ve $(uname -r | sed -r 's/-[a-z]+//') | sed ':a;N;$!ba;s/\n/ /g')

Besure that your system runs on the latest kernel course you cant go back to the previous kernel
I've been using them in Zorin 9 for some time now and no problems,
User avatar
blfriis
 
Posts: 194
Joined: Sat Nov 05, 2011 6:42 pm

Re: [STICKY] Clean, update & upgrade your system

Postby Swarfendor437 » Wed Nov 12, 2014 1:27 pm

Hi, Felt this needed to be made a sticky so it should now be at or near the top of the How-Tos first page! ;) :D

Visitors to this thread, please note - if you click on the 'Select All' it copies it into the clipboard - you then just right-click and select 'paste' in an open terminal (Menu | Accessories | Terminal or Ctrl+ Alt+ T)
https://vimeo.com/user15592214
https://trisquel.info/
https://www.opendesktop.org/member/257685/

Machine: ASUS X470-PRO, AMD Ryzen 7 1700X 8 Core, 16 Gb RAM, ZOTAC Geforce GT1030 (2 Gb)
User avatar
Swarfendor437
 
Posts: 10003
Joined: Wed Sep 18, 2013 5:51 pm

Return to How-tos and Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest