Diet for a penguin: cleaning a freshly installed Ubuntu from junk. Tools for cleaning Linux Ubuntu Utilities for cleaning the file system in Linux

In this article, we will share the 6 best CCleaner alternatives for Ubuntu Linux.

One of the most common categories of software on Windows computers is system cleaning and optimization. CCleaner - Popular and powerful program for Windows - scans and deletes unnecessary files and personal information (such as cache and browsing history), freeing up space and ensuring privacy.

Unfortunately, CCleaner is not suitable for Linux. If you were using it on Windows and switched to Ubuntu Linux(one of the recommended distros for Linux beginners), you are probably already wondering which software to use for the same purpose?

Whether you're an active Ubuntu user or not, if you're looking for a CCleaner alternative, you've come to the right place. In this article, we will share the 6 best CCleaner alternatives for Ubuntu Linux.

1.BleachBit

2. Stacer

3. FSlint

FSlint is a free and easy-to-use open source application for finding and cleaning various types of garbage in the Linux file system. It has both a GTK+ GUI and a command line interface that allows you to automate certain operations using scripts.


Remove duplicate files in Linux

It helps you remove/remove duplicate files in Linux, find and remove empty directories, unused temporary files, unwanted and problematic corruptions in files and file names, bad symbolic links, thus keeping your system clean. By completing all the above operations, you will recover the disk space that has been overloaded with unnecessary and unwanted files located in your file system.

To install FSlint on your Linux systems, use the appropriate package manager to install it as shown below:

Sudo apt install fslint [For Debian/Ubuntu] yum install fslint [For CentOS/RHEL] dnf install fslint [For Fedora 22+]

4. Sweeper

Sweeper is a simple and standard system cleaner for KDE. It is used to clean up unwanted traces of user activity on the system to protect your privacy and free up disk space by deleting unused temporary files. It can delete cookies, history, cache, image thumbnail cache, and also clears application and document history.

Sweeper System Cleaner

To install a system cleaner Sweeper on your Linux systems, use an appropriate package manager as follows:

Sudo apt install sweeper [For Debian/Ubuntu] yum install sweeper [For CentOS/RHEL] dnf install sweeper [For Fedora 22+]

5. Ubuntu Cleaner

Ubuntu Cleaner is also a free, open-source, easy-to-use Ubuntu system cleaner. This program frees up disk space and gets rid of all private information from your system, such as browser cache. It also removes: APT cache, thumbnail cache, unused packages, old kernels, and also old installers. Thus, it keeps your system clean and helps you free up disk space.


Ubuntu System Cleaner

To install Ubuntu Cleaner on Ubuntu and its derivatives, use the following PPA to install as shown below:

Sudo add-apt-repository ppa:gerardpuig/ppa sudo apt update sudo apt install ubuntu-cleaner

6. GCleaner

GCleaner is a free, clean, simple and fast open source system cleaner for Ubuntu Linux and its derivatives. This is a port of CCleaner developed using Vala, GTK+, Granite and Glib/GIO. Like all of the above system cleaners, it protects your privacy and makes your computer faster and safer to use.


GCleaner for Ubuntu

To install GCleaner on Ubuntu and its derivatives, use the following PPA to install as shown below:

Sudo add-apt-repository ppa:libredeb/gcleaner sudo apt update sudo apt install gcleaner

Please note that you can also use the Ubuntu Tweak Tool, however the project is no longer actively maintained - install and use it at your own risk.

This is all! In this article, we have presented the 6 best CCleaner alternatives for Ubuntu Linux. If we missed any software that should be on this list, please let us know in the comments.

Although Linux Mint 18.3 is a stable operating system, preventative cleaning in it still has to be done manually. Over time, in the operating system, and like in any other, garbage accumulates, which remains after removing programs, unnecessary dependencies, etc. Most experienced users clean the system using the terminal and a simple set of commands.

Basic commands you can run in a terminal window:

  • sudo apt-get autoclean(cleanses the system of deb packages that are no longer needed, it is recommended to do it periodically);
  • sudo apt-get autoremove(removes uninstalled dependencies on already removed packages);
  • sudo apt-get clean(clears the var/cache/apt/archives directory).

There are also programs for these purposes. One of them is in the Linux Mint repository, it can be installed directly from the “Program Manager”, it is called “ BleachBit" To install it, you need to launch the “Program Manager”, enter the name of the program “BleachBit” in the search field and install it.

Installing BleachBit

After installing the program, the shortcut for launching it is placed in the “Menu” in the “Administration” section; I note that two shortcuts are created for launching the program with and without root rights.


Menu. "Administration" section

We launch the program with root rights.


Program with “root” rights

A program launched with administrative rights allows you to clean shared partitions of the system, but to clean the system related to the user, you need to launch a second shortcut.

Slightly crazy title, isn't it? 🙂 Experienced users will definitely chuckle, and newbies will be happy. And all because, while using Windows, it was constantly necessary to clean and optimize the OS so that it would not simply slow down due to “cluttering” with old files, unnecessary keys in the registry, and so on. It’s just that when I just switched from Windows to Ubuntu I tried to find mana on optimization and I understand beginners perfectly well.

However, in Ubuntu you still need to sometimes clean the system from the cache with old packages (I use it for this), with which the program BleachBit, described below, does an excellent job. It is also capable of cleaning up many other temporary files, application caches and other “junk” places. I liked the file cleaning feature Thumbs.db, which Windows creates anywhere and everywhere. An overview of the program is below.

When the operating system is running, garbage inevitably accumulates in its various dark corners. These could be remnants of deleted programs, temporary files, logs, browser caches and other unnecessary things. Not all of this garbage can be collected and thrown away manually, so special cleaning programs are used for this. The topic of cleaning in Windows is pretty well covered, so let's talk about cleaning in Ubuntu.

Through the efforts of some open source preachers, the opinion has been created that Linux is a super reliable and perfect system that does not even need maintenance, unlike “that Windows of yours.” However, this is not at all true, and dirt, for example, accumulates in Ubuntu no less, and maybe more, than in Windows. Therefore, to clean up disk space, speed up the system, and safely delete data, it is better to use the utility BleachBit.

BleachBit is a convenient free system cleaning program that has versions for both Linux and Windows. The utility has a simple and intuitive interface in Russian. All points are provided with detailed tips, so its use will not raise any questions even for novice users.

The principle of working with the program is very simple and boils down to selecting cleaning options using the checkboxes in the middle column. After that, you can click the "Preview" button to search for garbage and then "Delete" to remove it. My program literally found more than a gigabyte of unnecessary files in just a few seconds.

In addition to the usual search and removal of garbage, BleachBit can perform a number of special operations:

  • Linux memory and swap cleanup
  • Removing faulty shortcuts
  • Removing unused localizations
  • Cleaning APT for Debian, Ubuntu, Kubuntu, Xubuntu and Linux Mint
  • Overwrite clean space to prevent previously deleted files from being recovered
  • Compresses databases of many programs to save space

Please note that some program functions require elevated rights, so you should run the program with administrator rights, for which there is a special shortcut in the main menu.

Generally, BleachBit is an indispensable assistant for keeping your system clean and freeing up additional space on your hard drive.

You can install the program from the Ubuntu Application Center or by downloading the installation file from the program website. There is also a version available for download for Windows, which can clean up traces of work in more than 500 programs and is a worthy competitor to Ccleaner.

How to free up disk space in Ubuntu? What do we do in this situation in Linux?

Wanted to clean up junk in Ubuntu, but were afraid to use the terminal? In the material below you will find a detailed description of several applications with a graphical interface with the help of which you can clean up garbage and not be afraid that you are executing a command in the terminal and do not understand what it is responsible for.

Let's imagine a task, we need to clean up the garbage. How to free up disk space in Ubuntu? What will we do in this situation?

Unlike Windows, where all the necessary tools are built into defragmentation and garbage cleaning occurs almost automatically, Ubuntu does not have such tools, but later in the material we will look at 4 ways in which you can free up free disk space that is occupied by hundreds of meters of files cache from the browser and apt cache and other garbage.

1. Clear APT cache (do this regularly and your system will breathe freely)

It sounds so obvious, and yet there's a good chance you haven't done it yet.

By default, in the Ubuntu distribution and the entire family of Debian relatives, files from each update are saved in the cache, that’s right, when updating, the files are downloaded, installed and then stored in the cache on the hard drive, just in case, in case you ever need these files again again. Alternatively, you deleted a certain application, but did not clear the cache, then you will want to install it again, but the application will no longer be downloaded from Canonical's servers again, but will be installed from the cache.

This is only useful if you very often (regularly) install and uninstall applications, it can be useful if you installed the application, but some bug arose and you again needed to reconfigure / reinstall a certain package, or you have a slow Internet (poor connection) in such situations this is very useful since you don’t have to re-load the network, which is already very weak.

But the other side of the coin is that the APT package cache can quickly increase from several tens to several hundred megabytes; when I clear it, sometimes it reaches up to 500 meters, this is the maximum I had.

To determine how many megabytes of APT cache we have collected, let’s run several commands in the terminal:

Du -sh /var/cache/apt/archives

As an example, I executed the command above and we have the following output:

147M /var/cache/apt/archives

As you can see, I now have almost 150 meters of APT cache.

To clear the APT cache, run the command in the terminal:

Sudo apt clean

after that the entire cache will be automatically deleted.

APT CLEAN is a command that removes all apt cache (packages), regardless of age or need, all clean. As I said above, if you have a slow internet connection, you may want to consider skipping this step and check out the next ones.

2. Uninstall unused applications

Most likely, you, like me, work without noticing that you have many installed applications on your system that you never use. Perhaps you installed it to see what the application is like, perhaps to write a review if you are a blogger, perhaps for a specific task and after that the application remained hanging in the system, taking up disk space.

Whatever the excuse, if an application is no longer needed and takes up free disk space, do not be afraid to get rid of such garbage and delete it.

Typical applications that you may want to remove, such as web browsers (which you have used several times and are still hanging around as unnecessary ballast Opera, Epiphany, Midori and Min), music players, the same Libre Office, standard system games, if you don’t use, get rid of and remove all this garbage. I use WPS Office as an alternative office, so I don’t need Libre Office, it takes up more than a hundred meters, everything needs to be deleted.

To remove you can use the following command:

Sudo apt remove package1 package2

like this, separated by a space, you can list a large number of applications in one command and delete them at once, don’t be friends with the terminal, use the Ubuntu Application Center/Ubuntu Software.

To remove packages and dependencies that are no longer needed (because you removed the application or other packages or newer versions were installed that replaced older ones), run the following command:

Sudo apt autoremove

removing unused packages from cache:

Sudo apt autoclean

If you have deleted an application, it will be good if you immediately clear the cache behind it by running the command:

Sudo apt autoremove application_name

installing dependency packages that were not fully installed:

Sudo apt -f install

if such dependencies exist, you will see a proposal in the console to install certain packages.

3. How to remove old kernels (if you no longer need them)

By frequently installing updates and installing the latest versions of kernels using the built-in system Ubuntu Software, you accumulate a decent list of kernels, which you see when you boot the system in the Grub menu. Of course, a list of several versions of kernels always has its advantages. Let’s imagine a situation where you installed a new kernel, but it encountered problems that prevent it from working normally (bugs and other shortcomings), in this case another version of the kernel will save you.

And if there is no other version of the kernel, this is of course an emergency situation, the only way to save the situation is by installing one of the versions using the console, this happens rarely, I didn’t have to save myself through the console by installing a new version of the kernel, what saved me was that there was at least one nearby Another version of the kernels, two were enough for me.

Now I have two versions installed:

  • 4.4.0.31
  • 4.4.0-34 - the main one used on an ongoing basis

I would advise you to do the same and always keep a spare site for work since there is never a guarantee that everything will be stable. If you have more than two versions of the kernel side by side, you can remove the unnecessary ones by running the following command in a terminal window:

Sudo apt autoremove --purge

Please note that this command will only remove kernels that a) are no longer needed, and b) were installed from the Ubuntu archive via system updates. If you install the kernel manually or using third-party PPAs, you will have to remove it manually. If no Old kernels are detected, this command will check the system for packages that remained on the system after removing applications and offer to remove if anything is found.

As an example, let's look at what kernel we are currently using:

Sudo uname -a

I see the following output after running the command:

Linux linuxsoid 4.4.0-34-generic #53-Ubuntu SMP Wed Jul 27 16:06:39 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Let's think logically, our version is 4.4.0-34, everything below can be demolished.

Let's look at what kernel versions we still have in the list, run the commands:

Dpkg --list | grep linux-image dpkg --list | grep linux-headers

we have the following output:

Ii linux-image-4.4.0-31-generic 4.4.0-31.50 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP ii linux-image-4.4.0-34-generic 4.4.0-34.53 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP ii linux-image-extra-4.4.0-31-generic 4.4.0-31.50 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP ii linux-image -extra-4.4.0-34-generic 4.4.0-34.53 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP ii linux-image-generic 4.4.0.34.36 amd64 Generic Linux kernel image ii linux-headers -4.4.0-31 4.4.0-31.50 all Header files related to Linux kernel version 4.4.0 ii linux-headers-4.4.0-31-generic 4.4.0-31.50 amd64 Linux kernel headers for version 4.4.0 on 64 bit x86 SMP ii linux-headers-4.4.0-34 4.4.0-34.53 all Header files related to Linux kernel version 4.4.0 ii linux-headers-4.4.0-34-generic 4.4.0-34.53 amd64 Linux kernel headers for version 4.4.0 on 64 bit x86 SMP ii linux-headers-generic 4.4.0.34.36 amd64 Generic Linux kernel headers

Based on this list, we understand that you can remove version 4.4.0-31; to do this, run the commands:

Sudo apt-get purge linux-image-4.4.0-31 sudo apt-get purge linux-headers-4.4.0-31

In terms of cores, that’s probably all. Although there is another command that will allow you to remove kernels of several versions in a row if they are in order, that is:

  • 4.4.0-31
  • 4.4.0-32
  • 4.4.0-33
  • 4.4.0-34
  • 4.4.0-35

I hope the principle is clear, in this case, in order for us to remove all these 5 versions of kernels, we just need to run the commands in the terminal:

Sudo apt-get purge linux-image-4.4.0-(31,32,33,34,35) sudo apt-get purge linux-headers-4.4.0-(31,32,33,34,35)

Be very careful when removing kernels so as not to accidentally ruin the system. After executing these commands above, the kernels will be removed, the grub loader should be automatically updated and the list of current kernels that are available when the system boots will be reduced, sometimes incidents happen due to which the grub loader may not be updated, then this must be done manually by running the commands:

Sudo update-grub sudo update-grub2

this should help and the bootloader will be updated.

Removing old kernels via GUI

The console option for removing Ubuntu kernels is described above, but there is also a graphical option, I know that beginners are afraid of the terminal like fire, in this case it is possible to remove using the Software Center application manager, which still needs to be installed if you have Ubuntu 16.04.

To install, open a terminal (Press Ctrl+Alt+T) and run the command in the terminal:

Sudo apt-get install software-center

As you probably know (have heard), in the Ubuntu 16.04 LTS distribution, the developers replaced the old application center with the Gnomish Ubuntu Software, in which they turned on foolproof protection and now you cannot delete kernels using the search as was available from the old application manager.

Removing kernels and cache, both browser and APT, and thumbnail cache via Ubuntu Tweak

Yes, the Ubuntu Tweak application handles removing old kernels, clearing thumbnail cache, browser cache, email clients, system cache (APT, unused packages/package settings) and all this is available by checking the box and confirming the removal by entering the administrator password when prompted. Instructions for installing Ubuntu Tweak are available in the material -.

4. Use the BleachBit application to clean up garbage in the system

BleachBit- it's something like CCleaner on Linux, which is similar to the same thing, I assure you that it is used in Windows for global garbage cleaning and, most importantly, without harm to the system, as this is possible in applications like GTKOrphan, due to inability to use such applications, you can ruin the system very easily. The application can remove almost all the garbage for most applications that are used in the system and have a cache, temporary files that accumulate and accumulate every day of work in the system, gaining hundreds of megabytes of disk space that can be used for more popular purposes than for storing system garbage.

The BleachBit utility can destroy the caches of more than 70 popular applications (including those for most web browsers); outdated packages, application files, bash history; which significantly simplifies the operation of the system.

Not surprisingly, I recommend installing this application as one of the main tools along with Ubuntu Tweak, for regular cleaning of garbage in the system.

You can install BleachBit on Ubuntu 16.04 LTS directly from Ubuntu Software by using the search where by entering the appropriate query, you can install this application in 2 clicks. Launch the BleachBit as Root option, check the boxes next to the applications, cache and temporary files that you want to clear. In the upper left corner, click the "Preview" button to get an estimate and visual visibility of how much space certain files (cache, temporary files, etc.) take up, look, click on the "Clear" button to delete them, that's all , now the system will breathe deeply)).

Installing an analogue of CCleaner, BleachBit on Ubuntu Linux

To install the BleachBit application on Ubuntu, open a terminal (Press Ctrl+Alt+T) and run the following command:

Sudo apt install bleachbit

After installation, you can find the application either in Dash using search or in the Ubuntu menu - System Utilities - BleachBit as Root.

conclusions

Original: The five best Linux file system cleaning tools
Author: Jack Wallen
Date of publication: January 11, 2012
Translation: A. Krivoshey
Translation date: February 2012

Everyone has heard about system cleaning utilities in Windows, but few people know that similar programs are available for Linux. Believe it or not, they exist, and today I want to introduce them to your attention. You've probably heard of some of them, and their functionality won't be news to you. Each of the utilities presented below will allow you to keep your Linux file system in order.

1. Synaptic

This functionality is available in Synaptic (in fact it is built into apt and many other package managers) - it allows you to get rid of unnecessary configuration files. They usually remain after packages are removed. This feature is very easy to use. Just click the "status" button in the lower left corner of the program window. Next, in the list that appears at the top of the left panel, select “Not installed (settings files remaining).” Now simply mark the configuration files you want to delete and click "Apply". Everything is very simple.

2.BleachBit

This is a handy utility for freeing up disk space and increasing system security. It has versions for Linux and Windows. BleachBit clears various caches, deletes cookies, clears website history, temporary files, logs and removes other garbage that you probably didn’t know about, but which is present in every system. BleachBit has a great GUI that makes it easy to select what you want to remove. Instead of selecting files or file types, you select applications or system lists, displayed in a tree structure. Additionally, you can specify the drives or directories that the program will work on, and even see an overview of what it will do before those actions are applied to your system. BleachBit is much more powerful than most other utilities, so it must be used with caution.

3.GtkOrphan

GtkOrphan makes it easy to remove unwanted packages from Debian systems. GtkOrphan is not installed by default, so first you need to install it (from Synaptic or from the command line). GtkOrphan is a GUI for deborphan and it scans and removes unnecessary libraries from the system. Depending on how many of them you have on your system, this could free up quite a lot of disk space. Like any application that removes libraries, it must be used with caution so as not to remove anything necessary for the operation of the system or programs.

4.Cruft

Cruft is a command line utility that scans your system and removes everything that shouldn't be there. It collects most of the results from the dpkg database, as well as from a list of "extra files" that are created during the lifetime of various programs on the system, and deletes them. The program has a fairly large number of options, including:
-d - search only on specified disks;
-chroots - do not check the validity of symbolic links in specified directories;
-ignore - ignore specified directories;
-r - create a report file

5. Gconf-Cleaner

Gconf-Cleaner is a utility that can be compared to registry cleaning programs in Windows. It scans the Gconf database (Gconf Registry - settings database for GNOME) and removes unused and outdated entries. Gconf-Cleaner is easy to use and, depending on the state of your system, can remove a fairly large number of entries. This is a graphical program and it also requires some caution when working with it (as when cleaning the registry in Windows). Although I have never experienced any problems with Gconf-Cleaner, it is theoretically possible to remove desired GNOME settings if not handled carefully. But there is also good news. If you completely ruin your GNOME desktop, you can always delete the GNOME settings directory in your home folder and start over.

Just proceed with caution...

Linux has many excellent utilities for cleaning your Linux system. Those described in this article are easy to use. Just remember to always be careful when cleaning your system, especially when working with libraries, dependencies, and anything else that requires root access.