Home Ubuntu How To Clean Up Junk Files In Ubuntu Using Ubuntu Cleaner

How To Clean Up Junk Files In Ubuntu Using Ubuntu Cleaner

By sk
Published: Last Updated on 10.3K views

One common thing we forget to do in our Ubuntu system is to clean up the junk files regularly. Sooner or later, we realize that our hard disk is running out of space. There are many ways to cleanup the junk files. We can manually delete the unnecessary files, old kernels. However, there are few useful applications available to make this task easy. A while ago, we have covered how to delete old kernels effectively using purge-old-kernels utility. In this brief tutorial, we are going to learn how to clean up junk files in Ubuntu and its derivatives like Linux Mint, Elementary OS and Pop OS etc., using Ubuntu Cleaner.

Clean Up Junk Files In Ubuntu Using Ubuntu Cleaner

Ubuntu Cleaner is the fork of the ‘Computer Janitor’ module of long-defunct Ubuntu Tweak utility. As you might know already, Ubuntu Tweak is discontinued years ago and is no longer in development now. The developer of Ubuntu Cleaner has pulled out the Computer Janitor module from Ubuntu Tweak, refurbished it and released it with new name i.e Ubuntu Cleaner. It is completely free to use and released under GPLv3.

Ubuntu Cleaner will remove the following in Ubuntu and its derivatives:

  • App caches
  • Browser caches
  • Apt cache
  • Package config files
  • Unneeded packages
  • Thumbnail cache
  • Old kernels

Ubuntu Cleaner is currently works well with Ubuntu 14.04, 16.04 and 18.04 LTS. To install it, just run the following commands:

$ sudo apt install software-properties-common
$ sudo add-apt-repository ppa:gerardpuig/ppa
$ sudo apt update
$ sudo apt install ubuntu-cleaner

For other Ubuntu versions, you might need to download the latest .deb file from the releases page and install it manually like below.

$ wget https://launchpad.net/~gerardpuig/+archive/ubuntu/ppa/+files/ubuntu-cleaner_1.0.4-1_all.deb
$ sudo apt install ./ubuntu-cleaner_1.0.4-1_all.deb
$ rm ubuntu-cleaner_1.0.4-1_all.deb

Once installed, launch it either from Unity Dash or Menu.

Launch Ubuntu cleaner

Launch Ubuntu cleaner

The default interface of Ubuntu Cleaner will look like below.

Ubuntu Cleaner Interface

Ubuntu Cleaner Interface

Select the files you want to clean up and hit the Clean button on the lower right corner.

Clean Up Junk Files In Ubuntu With Ubuntu Cleaner

Clean Up Junk Files In Ubuntu With Ubuntu Cleaner

Ubuntu Cleaner will start to clean up the files you have selected.

Cleaning Junk Files

Cleaning Junk Files

Congratulations! Your Ubuntu system is free from junk files.

Ubuntu system is clean

Ubuntu system is clean

Now, your system became like a freshly installed one.

Not happy with Ubuntu Cleaner?, run the following commands to remove it (I think you won't).

$ sudo apt-get remove ubuntu-cleaner
$ sudo apt-get autoremove

And finally remove the PPA.

$ sudo add-apt-repository -r ppa:gerardpuig/ppa

Is your hard drive running out of space? Just install Ubuntu Cleaner and purge-old-kernels utility and get rid of the junk files and older kernels which are no longer necessary. Both are must-have utilities in your Ubuntu system.

Resources:

You May Also Like

10 comments

ChiefH December 15, 2016 - 3:48 pm

I still have Ubuntu Tweak on my 16.04LTS computer and other than the applications tab, all parts of it still work. Iuse the Janitor before each kernel update to make room for the update. I leave the last kernal for use if the newest kernel update does not work correctly or has problems.

How is Ubuntu Cleaner improved from the Janitor?

Reply
SK December 16, 2016 - 6:44 am

Nothing improved as far as I tested it. The developer of ubuntu cleaner just picked up the Janitor module and released it under new name.

Reply
Dick Pilz December 15, 2016 - 4:08 pm

The program would launch and stop responding on my 6-month-old Lenovo IdeaPad w/8GB running 16.04 LTS, repeatedly. No error or warning messages from it.

Glad you posted the removal commands.

Reply
SK December 16, 2016 - 6:45 am

I tested it on my Ubuntu 16.04 LTS machine. It worked well. I use DELL Inspiron model laptop.

Reply
mrtoo January 23, 2017 - 4:12 pm

I still use Ubuntu Tweak as well on the UM 16.04. Seems to work well. Bleachbit always seems to get me in trouble.

Reply
Yan February 20, 2019 - 7:35 pm

Seems like this Ubuntu Cleaner is copletely broken, it throws one exception after another saying that some services not found. So I dont know why it dont require dependencies as every normal app does, but for me it seems quite stupid to manually search what dependencies are missing. I just thrown this program to trash. Linux Mint 17 (based on Ubuntu 14.04.5 LTS).

Reply
Jeff Dingle February 3, 2021 - 8:52 pm

After many years succesfully using Ubuntu-Tweak on Ubuntu and Lubuntu machines I had to upgrade to 18.04 LTS on one 32bit machine and could only succesfully install Ubuntu-Cleaner (the Jaintor cleaning part of Ubuntu-Tweak). All went well and so did the cleaning part until it failed to remove the old kernels and old package configs, leaving the following message:

You are not allowed to perform this action
You do not have the required privileges to perform this action

Details: org.freedesktop.PolicyKit.Error.Failed: (‘system-bus-name’)

I assume that I need further permissions, i.e. to enter my admin password at this point (as was required with Ubuntu-Tweak) but unfortunately there is no option to do this. Is there a solution to this problem so that these files can be removed with the password method or perhaps does it require some further typing in the terminal to achieve the same effect…
I hope that the answer is out there somewhere – and I look foward to a solution with anticipated breath. The rest of Ubuntu-Cleaner seems fine and I am pleased to say a big THANK YOU and WELL DONE to Gerard for sticking with this project.
Thanking you in advance for any help and assistance….

Reply
sk February 4, 2021 - 11:39 am

Launch Ubuntu with sudo permission and try again.

Reply
Jeff Dingle February 4, 2021 - 5:26 pm

Thank you SK for the heads up about running Ubuntu Cleaner from the terminal with the sudo permissio. It worked well, opened Ubuntu Cleaner and I was able to succesfully clear the old kernels and old package configs, etc. Closed the application in the normal way, which then completed the terminal command sequence and I was then able to safely close the terminal.

Just another question – instead of using the terminal each time, is it possible to use the terminal or the text editor within the app to allow it to always run from the sudo command automatically or is that a bad idea?

Once again many thanks for you help and assistance – it has been greatly appreciated. Best regards….

Reply
sk February 4, 2021 - 7:02 pm

Glad I could help. Regards.

Reply

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. By using this site, we will assume that you're OK with it. Accept Read More