Tools for cleaning Linux Ubuntu. BleachBit - cleaning the operating system from "garbage" Ubuntu system cleaning

Tools for cleaning Linux Ubuntu. BleachBit - cleaning the operating system from "garbage" Ubuntu system cleaning

20.10.2023

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.

Have you ever wondered why a freshly installed Ubuntu with a basic graphical interface and a meager set of standard applications takes up as much as 2 GB of disk space? If so, then read on - we will put the penguin on a diet and make it take up much less space.

Formulation of the problem

Today's Linux distributions are not only fast, convenient and pleasing to the eye, but also incredibly bulky. As standard, most of them take up more than 4 GB. And this despite the fact that they are able to provide the user with only one graphical environment and a small set of applications (by the way, there are not even codecs for playing audio and video files). Where do the treasured gigabytes of free space go?

Oddly enough, the reason for Linux's gluttony lies in its main advantage. A good Linux distribution is a very flexible operating system that can adapt to any user and any hardware. It has everything to satisfy the needs of 99% of users: a huge number of drivers that can breathe life into almost any piece of hardware; a bunch of different demons, applets and widgets that make communication with these pieces of hardware simple and clear; a set of the most popular applications by users; support of several languages; various tools for people with disabilities and much more. All this can and should take up some space on your hard drive. Linux provides no less freedom of choice to programmers. Without any standardized interface to communicate with the operating system in the form of a single API, such as win32 in Windows or Cocoa in Mac OS X, Linux encourages the use of any programmer-friendly interfaces and runtime environments. The developer is free to choose his own GUI libraries, be it GTK, Qt or even FLTK. He can use any available libs without worrying that they will not be on the target system, because the package manager will install them on its own anyway. He can write applications in almost any existing programming language, and all the necessary interpreters, virtual machines and libraries will also be automatically installed. It goes without saying that when bundling the installation disk, all these endless dependencies will be included in the package, and during installation they will end up on the user's hard drive. And you shouldn’t even hope that the distribution developers will select software based on its number of dependencies and making sure that they don’t drag anything unnecessary into the system. For example, the standard Ubuntu distribution includes a simple note-taking program called Tomboy, and this small program takes up all of mono's runtime, taking up more than 30 MB of disk space. There are many more different nuances in the structure of the Linux distribution that make it more cumbersome, but those described above are the basis from which we will build, ridding the penguin of the fat layer.

Getting rid of trash

Let's start by trying to cleanse the system of clearly unnecessary slag, while preserving the original Ubuntu desktop almost unchanged and installing all any necessary applications in place.

So, install Ubuntu and execute “df -h”. The amount of occupied disk space is no less than 1.9 GB. We immediately look at the applications menu. Here we have a Games section, which is hardly of any value. We delete all its contents with one command:

$ sudo apt-get purge gnome-games-common gbrainy

The gnome-games-common package will pull down aisleriot, gnomemahjongg, gnome-sudoku, gnomine, quadrapassel along with all configuration files and free up 20 MB of space for us. We go to the menu again, the most useless thing is now in the Accessories item. These are a calculator (gcalctool), a font research program (gucharmap), a disk space usage analyzer (baobab), a file search program (gnome-search-tool) and that same Tomboy. Delete:

$ sudo apt-get purge gcalctool gucharmap baobab gnome-search-tool tomboy

This operation will give us another 10 MB of space and open up the opportunity to get rid of mono. We do:

$ sudo apt-get purge mono-2.0-gac mono-charp-shell mono-gac mono-gmcs mono-runtime

That's another 30 MB.

We return to the menu again. From the completely uninteresting: a program for recording from a microphone and a video editor pitivi. Unfortunately, it is difficult to immediately determine whether a voice recorder belongs to any package, so we will install the apt-file utility, which will help do this:

$ sudo apt-get install apt-fi le
$ apt-fi le update
$ apt-fi le search /usr/bin/gnome-sound-recorder gnome-media: /usr/bin/gnome-sound-recorder

The package we need (more precisely, not needed) is called gnome-media, delete it:

$ sudo apt-get purge gnome-media

$ sudo apt-get purge gnome-dictionary wamerican vinagre tsclient rdesktop

Another 5 MB and a cleaner menu. The rest of the programs can be left in place for now and get rid of rubbish such as documentation, goodies for people with disabilities, examples, a screen saver and the Ubuntu testing system:

$ sudo apt-get purge gnome-accessibility-themes gnome-doc-utils gnome-mag gnome-screensaver screensaver-default-images xscreensaver-* gnome-user-guide example-content checkbox* branding-ubuntu

This will free up another 167 MB of space. Next, we will deal with “dangling” dependencies - packages that were listed in the dependencies of packages we have already removed and are now no longer needed. To do this we need the orphaner program included in the deborphan package:

$ sudo apt-get install deborpan

We launch the program, see the list of “orphans”, mark them with a space and select the “OK” button. At the end of the procedure, a list will be displayed again, this time listing the "orphans of orphans". We repeat all steps until the list is empty. Further cleaning will inevitably affect the functionality and appearance of the distribution, so those who love Ubuntu for what it is should stop there. Everyone else, welcome to the next section of the article.

A bunch of kernels in the boot menu

Over time, the Ubuntu boot menu may acquire a large number of kernel variants (updating the kernel does not remove the old kernel). To clear it, just run the following command:

$ aptitude purge $(aptitude search ~ilinuximage -F %p|egrep -v "$(uname -r)|linux-imagegeneric")

Big cleaning

Ubuntu includes quite a lot of applications, and not every one of them suits all users. For example, I haven’t used email programs for several years now, preferring the web interface of gmail, and the interface of the standard Ubuntu player Rhytmbox makes me sick (as, indeed, its ideological parents - Amarok and iTunes). Therefore, for me they are of no interest and only clutter the menu. Someone else may not need the IM client and office suite. And all this can be abandoned painlessly.

Probably the thickest component of Ubuntu is OpenOffice. It is, of course, very necessary if you are a student, a teacher or a secretary, but for most people it does not give up at all, so we get rid of:

$ sudo apt-get purge openoffice*

Another 256 MB of cleanliness. Not bad. Next in line: the inconvenient mail client Evolution, the completely useless video player Totem and the audio player for fans of licensed music Rhytmbox:

$ sudo apt-get purge evolution evolution-common evolution-data-server evolution-indicator evolution-plugins evolution-webcal libevolution totem totem-common libtotem* rhytmbox mediaplayer-info libgnome-media0

This is another 26 MB and a strong feeling of being right. Now we can remove the gstreamer multimedia framework used by Totem and Rhytmbox, but there are two pitfalls here. Firstly, gstreamer is heavily tied to the entire system, and completely getting rid of it will entail removing some necessary system packages. We can only get rid of the framework's utility packages, but even then we'll have to say goodbye to the Brasero disc burning program. If this is not important, then do the following:

$ sudo apt-get purge gstreamer0.10-alsa gstreamer0.10-nonlin gstreamer-0.10-nice gstreamer0.10-plugins-base gstreamer0.10-plugins-base-apps gstreamer0.10-plugins good gstreamer0.10-pulseaudio gstreamer0. 10-tools gstreamer0.10-x gnome-codec-install brasero*

Ubuntu comes with Shotwell photo manager. It may be convenient for those who take fifty photos a day, but for the average person it is much more convenient to view photos through Nautilus:

$ sudo apt-get purge shotwell

This is 4 MB. There are also things like the Empathy IM client and the Gwibber social networking client. In many ways, useful programs, but meaningless for people who cannot stomach socialism:

$ sudo apt-get purge empathy empathy-common telepathy-* gwibber gwibber-service

18 MB down. You can also remove the transmission BitTorrent client and the firefox browser, but this is already blasphemy and is only permissible if they are replaced with Deluge and Google Chrome. Now let's move on to the "System Administration" menu. It has many more important applications, but still a lot of unnecessary stuff. For example, I absolutely do not understand the purpose of a program called Computer Janitor. She had never found something truly useless and cleaned the system in any way. Accordingly, into the firebox:

$ sudo apt-get purge computer-janitor*

The language selection utility is also a rather controversial program, in most cases completely unnecessary:

$ sudo apt-get purge language-selector language-elector-common

Now let's talk about hardware support. As I already mentioned at the beginning of the article, Ubuntu supports a huge number of different hardware, for each of which the system has not only a driver that takes up several tens of kilobytes, but also a much heavier package in the form of various daemons and applications that work with this driver.

For example, Ubuntu supports Bluetooth technology very well, for which the system has drivers, daemons, and graphical configuration programs. The only question is whether blue-toothed is needed in our time of dominance of 3G and Wi-Fi networks. I think many people no longer do. Therefore, in most cases, you can refuse Bluetooth support:

$ sudo apt-get purge bluez*

This command will remove not only the Bluetooth protocol implementation distributed in the bluez package, but also all its dependencies in the form of gnome libraries and GUIs. The gain is modest: 12 MB.

Next, do you have a scanner at home? If not, then support for scanners in the system is not needed. Ubuntu offers a simple document scanning program called Simple Scan, which relies on the standard SANE scanner library. By removing the latter, we will remove support for scanners completely:

$ sudo apt-get purge libsane

This will give us an additional 15 MB. Third: you probably have a printer, and most likely it is connected to your home machine, so if you are cleaning Ubuntu installed on a laptop, then you can also get rid of printer support:

$ sudo apt-get purge cups cups-common hpijs hplip-data gsfonts

Now it's time for video drivers. Ubuntu contains a full set of Xorg drivers, but we only have one video card. Accordingly, everything else can be removed, but to do this you will first have to find out which drivers are supported by the hardware, so as not to accidentally remove the one you need. This can be done using the following command:

$ cat /var/log/Xorg.log.0 | grep "autoconf gured driver"

Immediately after the word "Matched" the driver name will be indicated; you need to remember it. In this case, there may be several drivers, this is quite normal, and it is better to leave them all. The rest can be removed using apt-get. Just type "apt-get purge xserver-xorg-video-", double click and delete everything in order, except for those names that we remember. For example, you can take the following command, which removes all drivers except fbdev and vesa:

$ sudo apt-get purge xserver-xorg-video-(apm,ati,chips, irrus,geode,i128,i740,intel,mach64,mga,neomagic,nouveau,nv,openchrome,r128,radeon,rendition,s3,s3virge ,savage, siliconmotion, sis, sisusb, tdfx, trident, tseng, vmware, voodoo)

You can also rub various goodies for nVidia and ATi drivers:

$ sudo apt-get purge nvidia-* fglrx-modaliases radeontool

And along with them are the kernel header files, which are included in Ubuntu only to assemble and install modules for proprietary video drivers, but in a normal situation they are rarely needed and take up 90 MB:

$ sudo apt-get purge linux-headers-*

There are still quite a few different utilities and libraries left in the system that are specific to specific pieces of hardware, but we can spend the whole day dealing with each of them. Instead, we will get rid of the junk hidden deep within the system. For example, compiz (unless, of course, you need desktop effects):

$ sudo apt-get purge compiz*

The speech synthesis system can also be thrown away; it is needed by people who have vision problems:

$ sudo apt-get purge espeak* speach-dispatcher gnome-rca

Tools for developers are also most likely not needed (of course, if you are not a developer yourself):

$ sudo apt-get purge gcc-4.4 gdb make

The courchdb database along with erlang, used to store various information in Gnome, is also not needed:

$ sudo apt-get purge erlang* courchdb

The smbclient library, used to access Windows balls, is not needed on separate machines (and it also takes up more than 50 MB):

$ sudo apt-get purge smbclient linsmbclinet

We also don’t need xulrunner, which is used to create XUL interfaces:

$ sudo apt-get purge xulrunner-1.9.2

You can also cut the following console software: dc, bc, ed, ftp, lftp, pcmciutils, screen, rsync, strace, xterm, lsof, w3m, telnet, tcpdump, vim*. In this case, you should be guided by a simple rule: if you don’t know what it is, then you don’t need it.

That seems to be all. Now let’s run orphaner so that it can clean up the remaining dependencies for us:

Let's look at the amount of free space:

1.4 GB, the command "sudo du -sh /" will give a more accurate 1.3 GB. We subtract the size of the /var directory from them (you can get it like this: “du -sh /var”) and we get 1.1 GB. Almost twofold reduction in weight while maintaining the full functionality of Gnome, including configuration utilities, administration, installing and uninstalling packages, and creating network connections. We also still have access to the Firefox browser, Evince document viewer, Nautilus file manager, Eye of Gnome photo viewer and file-roller archiver.

But moreover, we can free up about 90 MB of space if we remove the documentation and unnecessary locales:

$ sudo apt-get install localepurge

We mark in the list “en” and “en_GB” (if we are working in the English version of Ubuntu), or “ru” and “ru_RU” (for the Russian version).

Let's run the program:

$sudo localepurge

Now we remove the documentation:

$ sudo /usr/share/(doc,gtk-doc)

Back to the roots

Now let's talk about what to do for people who don't want Gnome on their desktop and would like to replace it with something lighter.

In the case of any other distribution, the recipe would be extremely simple: remove all packages with the word gnome in the name, plus clean up the remainder by removing applications and libraries. But this trick won't work with Ubuntu, it has built-in "foolproofing" which, if any of the packages that break Gnome are removed, will force the installation of the kubuntu-desktop package, dragging the entire KDE with it (just try to remove gnome, and you will see what apt-get suggests for installation). Therefore, you can completely clear Ubuntu from Gnome in only two more or less simple ways: either download Ubuntu Server and install it in a minimal configuration, and then install everything that is required, or bypass the security system by deleting all gnome packages at once.

I won’t explain the first method, but I’ll say a few words about the second. In Ubuntu, there is simply a huge number of packages that make up the Gnome environment, you will have to enter their names manually until the evening (and if you are reading this in the evening, then until the morning), so I prepared a list of the necessary packages in advance and put it on . All that is required is to simply copy its contents as an argument to the "apt-get purge" command.

conclusions

The cleaning method described in the article works perfectly and has been tested more than once by the author. Of course, we could achieve even more impressive results by shrinking Ubuntu together with Gnome to 500 megabytes, but it would take a whole book to describe all the steps necessary to achieve such a goal.

Info

  • Don't be afraid to remove a package unless you're sure someone else needs it. The apt-get utility will show a list of its dependencies before removal, and you can make a decision.
  • To prevent the cache of packages downloaded using apt-get from cluttering up the system, it must be cleaned periodically: sudo apt-get clean .

BleachBit- this is software that allows you to easily and quickly clean your operating system of accumulated “garbage”. The main advantage of BleachBit is that the cleaner is a cross-platform application that can easily be run on both Linux and Windows.

This kind of software is, first of all, necessary for those who like to install and remove a lot of different software.

During the work of each user, a lot of different “garbage” accumulates, in the form of remnants of configuration files of long-deleted applications, log files and other information no longer needed by anyone.

Screenshots

Description of BleachBit

BleachBit's strengths:

  • The program is well Russified and each item in the cleaner menu is clearly explained, which undoubtedly indicates that the application was developed with beginners in mind.
  • The cleaner allows you to remove unused interface languages.
  • Using BleachBit you can clear RAM and virtual (swap) memory.
  • The program is capable of deleting temporary files, cookles, list of downloaded files and passwords of various browsers (, Safari, Chrome, SeaMonkey, etc.). In addition, the program optimizes the databases used.
  • BleachBit supports temporary file cleaning and database optimization of programs such as aMSN, aMule, Audacios, Beagle, Easytag, Evolution, emesene, gFTP, Gwenview, Lives, Miro, MySQL, and many other programs.
  • The program also cleans the history and cache of Gnome, Nautilus, Adobe Flash.
  • BleachBit allows you to clean all files Thumbs.db, which appear as a result of the operation of Windows OS.

Weaknesses of BleachBit:

  • No weaknesses found.
  • Interface language: Russian
  • License: GNU GPL
  • Homepage:

Installation

  1. In order to download the latest version of BleachBit on Linux, you need to download the distribution from . If you are using the operating system Ubuntu, Debian, Linux Mint, Fedora, Red Hat, Mandriva, openSUSE or CentOS, then do not forget to install the additional package Bonus pack.
  2. You can also download BleachBit on the Windows operating system from .
  3. The official Ubuntu repository uses an outdated version of BleachBit, so it is not recommended to install from it, but if this is not important for you, you can install it with the command:

    sudo apt-get install bleachbit

After installation, BleachBit can be launched via a shortcut Applications→System Utilities→BleachBit.

Most likely in this section of the menu there will be 2 shortcuts to launch the application: BleachBit And sudo BleachBit.

If you need to clean the operating system using BleachBit only in your home directory ( /home/login), then you will not need superuser rights, so to launch BleachBit it will be enough to launch it through a shortcut BleachBit.

If you plan to clear the cache APT, remove unnecessary interface localizations and other actions that require superuser rights, then it is more correct to launch the shortcut sudo BleachBit.

BleachBit is not a computer repair tool, but rather a tool to “lighten” your operating system. If your computer breaks down at home, and you don’t understand much about it, then the easiest way is to turn to specialists. Computer repair at home is carried out by many organizations that will quickly fix your problem.

But it is worth remembering that not every computer help is equally useful. Computer repair should be entrusted only to real professionals.

Similar 7 programs:

Comments

  1. Catherine
    26 January, 16:41
  2. Lyokha
    1 February, 10:18

    For some reason, BleachBit as Administrator does not start for me, I assume this is sudo BleachBi. And without administrator rights, almost nothing can be deleted, they write “access denied.” I installed it as it is written here, everything was fine, but something was probably not quite normal, even though I downloaded it from the website and installed the bonus pack. Can you tell me what I can do?

  3. Alex_vgf
    3 February, 18:34

    Thank you, I've been looking for something to clean for a long time))

  4. Lyokha
    14 February, 20:01
  5. Mut@NT
    16 February, 17:52

    Catherine: And I had to delete the history and transmission cache with this program))

    The first time I gave her chrome cookies too))

    Lyokha: Out of the blue, sudo BleachBit started up, I tried it before - to no avail, but a week later I tried it again - it started up quickly without any complaints and cleaned everything without any problems. But you still have to climb through the folders yourself and delete them manually

    I'm glad everything worked out on its own

  6. Yuriy
    8 June, 19:01

    Good afternoon Who can tell me why the program persistently displays a message during the scanning process about the lack of free space on the root and in home? I have 60 GB allocated for root, Home – 260! There are only about 10 GB USE on the root. What nonsense? Moreover, I installed it on different distributions many times and always the same thing! Is this a “chronic glitch” or am I misunderstanding something?

  7. Such a thing
    10 December, 00:17

    When launched from the terminal, bleachbit will send: (bleachbit:19322): IBUS -WARNING **: The owner of /home/uzer/.config/ibus/bus is not root!

Although Ubuntu is a stable system, everything is relative, of course, but in it you also need to periodically do something manually, even if there is a program to do it, you will still need to launch it manually in tandem with your head. Sometimes excess garbage accumulates in the system, which remains after removing programs, unnecessary dependencies, etc. Of course, you can do everything using the Terminal, for example with the commands:

sudo apt-get autoremove
This command removes undeleted dependencies from packages that have already been removed,

sudo apt-get clean
Cleaning the /var/cache/apt/archives/ directory.

After updating the kernels, the old kernels do not go anywhere, but rest peacefully next to the new kernel. Therefore, they also need to be removed, and the best way to do this is with the very useful Ubuntu Tweak program. In addition to cleaning the system, the program has many other useful features.
With this tweaker you can:

  1. Install programs.
  2. Find out information about the system.
  3. Manage startup items.
  4. Set up login and logout.
  5. Configure various desktop settings.
  6. Adjust Compiz Fusion.
  7. Manage power and security.
  8. And etc.

Program installation:
sudo add-apt-repository ppa:tualatrix/ppa
sudo apt-get update
sudo apt-get install ubuntu-tweak

After installation, the program will appear at: Applications - System -

Another useful system cleaning program is called BleachBit. It is available in the Ubuntu repositories and can be installed directly from the Ubuntu Application Center.

"Softina" allows you to remove unused interface languages.
Using BleachBit you can clear RAM and swap memory.
The program can delete temporary files, cookles, a list of downloaded files and passwords of various browsers (Opera, Safari, Firefox, Chrome and others). In addition, the program optimizes the databases used.
The program also cleans the history and cache of Gnome, Nautilus, Adobe Flash.
BleachBit makes it possible to remove all Thumbs.db files that appear as a result of running Windows.

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.

© 2023 hecc.ru - Computer technology news