Clean Ubuntu System

Linux doesn't produce unwanted junk files, but after upgrading, Linux will not automatically delete those files.

Clean Cache

$ sudo apt-get autoclean      # Clean old version application's cache
$ sudo apt-get clean          # Clean all application's cache
$ sudo apt-get autoremove     # Remove the isolated software systems no longer in use

Cleaning up isolated software packages:

$ sudo apt-get install deborphan -y

Clean Kernel

Check current kernel:

$ uname -a

Check all kernel:

$ dpkg --get-selections | grep linux

Remove useless kernel:

$ sudo apt-get remove linux-image-x.x.xx-xx-generic
$ sudo apt-get remove linux-headers-x.x.xx-xx
$ sudo apt-get remove linux-headers-x.x.xx-xx-generic
0.00 avg. rating (0% score) - 0 votes