Want to safely delete unnecessary files from your Linux operating system, reclaim hard-drive space, and protect your privacy? BleachBit does all of this for you!
Why Not Use rm?
Of course, you can also use
rm to delete all unwanted or unnecessary files from your system. However, the benefit of using BleachBit is it scans your hard drive for specific file types, and then deletes only those types. This means you don’t have to go looking for them, nor do you have to check all the locations in your file system, as you have to do with
rm. Any momentary lapse of concentration while using
rm can be disastrous.
BleachBit, on the other hand, is constrained to only delete files that can be safely removed, and it knows where they reside in the file system. It searches the appropriate locations for you and shows you a preview of what it’s going to delete before it does so.
This tool categorizes the file types into groups, and you can select or deselect entries in each category. This defines the types of files for which BleachBit will search. The categories you see will vary by distribution according to the applications you have installed on your computer.
For example, excess files from package managers are good candidates for being purged from your system. However, you’ll only see the
apt category when BleachBit is running on Ubuntu and other Debian-derived distributions. This is because it wouldn’t make sense to show that category on something like Fedora.
yum categories will be displayed. Likewise, you won’t see a category for Chromium unless you have the Chromium browser installed on your computer.
Deleting these files not only frees up some disk space, but it also helps you maintain your privacy by removing records of your activities.
To install BleachBit in Ubuntu, use this command:
sudo apt-get install bleachbit
To install BleachBit on Manjaro, type this:
sudo pacman -Syu bleachbit
To install BleachBit on Fedora, the command is:
sudo dnf install bleachbit
At this writing, the BleachBit version for Fedora 32 hasn’t yet been added to the repository. If you’re on Fedora 32, you can do the following to install BleachBit:
- Click “Fedora 31” on the BleachBit website to download the file.
- Double click the file in the “Downloads” folder.
- After the Software application opens the file, click “Install.”
If you use
sudo to launch BleachBit, it will be able to access system temporary and log files, as well as files that belong to the root account.
If you launch BleachBit without
sudo, it operates only on files that belong to you and the account you’re currently logged into. BleachBit displays more categories of files when you run it under a normal user account. This is because it will include user-specific files from applications you might have installed, such as Firefox and Thunderbird.
Type the following to use
sudo to launch BleachBit:
Type the following to launch BleachBit without
After the first launch, you’ll see the “Preferences” dialog box, in which you can configure BleachBit. You can access these settings any time by selecting “Preferences” from the hamburger menu on the main screen.
You’ll see the following options:
- “General”: Here, you can choose whether you want BleachBit to perform the following actions:
- Check for updates (including Beta releases).
- Show or hide file categories for all supported applications, whether they’re installed or not.
- Exit after performing deletions.
- Require confirmation before deleting files.
- Use ISO/IEC or SI units for file sizes.
- Use Dark mode.
- Show debugging information during its actions.
- “Custom”: Choose whether to add files or folders, as well as which are selectable, and which can be included or excluded from the scan and delete actions. You can also include locations that aren’t offered by BleachBit by default.
- “Drives”: BleachBit can overwrite free space and make the data there unrecoverable. For each partition in your file system, you must create a writable folder and add its path to this tab. If your file system only has a single partition, the default values will be fine.
- “Languages”: All the languages available in your Linux distribution will be listed under this tab, so just select those you want to enable. Your default language will already be selected. BleachBit will also offer to remove any that aren’t selected.
- “Whitelist”: Under this tab, you can specify locations you want BleachBit to ignore, and they’ll remain untouched.
The BleachBit main window has two panes: the list of file categories on the left, and the options within each category on the right. You can click the checkbox beside any option to select it, or click a category name to select all of its options.
If you select an option that will take a long time to complete, or one that might affect stored passwords, you’ll see a notification. You can still choose those options, but BleachBit is just making sure you know what they do.
When you highlight a category, BleachBit displays a description of the options within it in the pane on the right. You can scroll through the categories and options, and select the file types you want to clean.
We’ve selected options to delete files for Firefox, but leave the password settings the same. We’ve done the same for Thunderbird.
After you make your selections, click “Preview,” and BleachBit will perform a dry run.
It will scan the file system according to the configuration and options you selected. You’ll then see a report that includes the number of files it expects to delete, and the amount of hard drive space that will be freed as a result. The values are shown as hard drive space per selected option, and as a total in the pane on the right.
If you’re satisfied with the information and want to proceed, click “Clean.” If you previously selected the “Confirm Before Delete” configuration option, BleachBit will ask if you’re sure you want to proceed.
Click “Delete” to delete the files, or “Cancel” to return to the main BleachBit window.
If you click “Delete,” BleachBit will carry out the cleanup and delete the files from your system. If you previously selected any of the secure erasing or overwriting options, this might take some time. However, keep in mind that most modern journaling filesystems make it very difficult to guarantee that deleted files have been overwritten.
After BleachBit completes its scan and delete actions, it will report how many files it deleted and how much hard drive space is now free.
RELATED: How to Securely Delete Files on Linux
Repeat, as Necessary
The temporary and log files, and other disposables BleachBit removes will be replaced and re-created as you continue to use your computer. Over time, they’ll build up again. But now, you can use BleachBit periodically to keep them in check.
Send your news and stories to us firstname.lastname@example.org or email@example.com and WhatsApp: +447747873668.
Before you go...
Democratic norms are being stress-tested all over the world, and the past few years have thrown up all kinds of questions we didn't know needed clarifying – how long is too long for a parliamentary prorogation? How far should politicians be allowed to intervene in court cases? To monitor these issues as closely as we have in the past we need your support, so please consider donating to The Climax News Room.