The 4 Best Ways to Clean Your Ubuntu Distribution

Recently, Lubuntu launched its newest distro Lubuntu 18.10 which is fast, and more graphically intuitive than 18.04. It’s based on the LXQt platform and I am currently testing it on my Acer Aspire One D257 Netbook and believe me it runs fast as hell.

As it is the initial release of the distribution, there are some bugs that need fixing. For instance, I was unable to clear my trash can no matter how many times I tried! So, I began my search on how I can clear my trash as well as keep my Linux system clean of any unused packages and garbage for that matter.

So, here I bring you the 4 simple steps to clean your Ubuntu system (and maintain it’s Shine)

1. Clean the Apt Cache

An Apt-cache is a place where Ubuntu stores all the files that you’ve downloaded and you may have to refer them at a later time. Most of the users don’t even bother to clean this up and may take up hundreds of MBs. Whenever you check for an update the Apt toolkit looks for all these files for an update which also consumes your data.

To check the cache size of your system, run the command below:


  1. du -sh /var/cache/apt/archives


The 4 Best Ways to Clean Your Ubuntu Distribution

You’d be surprised to know that if you have been using your distribution from a long time, the size of the file is way bigger. As my distro is fairly new, I have only about 20 KB  Run the below command to clean it up!


  1. sudo apt-get clean


2. Remove unused Kernels

If you are running an Ubuntu system/installation for more than a year, chances are high that you are having multiple kernels installed. If you have the current and latest hardware and is compatible with Linux kernel and needs no configuration, then you may want to remove old kernels and keep only the latest one. Run the below command to clean those up:


  1. sudo apt-get autoremove --purge



3. Remove Old Packages and Apps

If you constantly experiment with Linux apps or you are just curious like me to try and test out different apps in the system, then there might be some unused apps which you don’t use anymore.

To get the history of the packages that you’ve installed, run the command below in the terminal to get the list of apps and packages recently installed.


  1. history | grep "apt-get install"


The 4 Best Ways to Clean Your Ubuntu Distribution

This will give you a list of apps which you have installed in recent pasts:


  1. grep " install " /var/log/dpkg.log.1



  1. zgrep " install " /var/log/dpkg.log.2.gz


4. Use a Cleaner App

Like CCleaner for Windows, there are plenty of free and native system apps. BleachBit is one of the oldest app in the cleaner category.

Install BleachBit by using the command below or download it from Ubuntu Store.


  1. sudo apt install bleachbit


Once installed, open BleachBit and run a scan. It would show you all cache files your browser is taking up, all temp files, trash, etc and with a click of a button you can clean it up!

The 4 Best Ways to Clean Your Ubuntu Distribution

So that’s it these are the 4 best ways to clean your Ubuntu system and let your system breathe now and do not forget to update the apps and keep the system up-to-date.

Have you got any method or application that you use? Write it down in the comments down below.

Leave a Reply