> ## Content Index
> Fetch the complete content index at: https://itsfoss.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# How to Use BleachBit to Optimize Ubuntu Linux
- URL: https://itsfoss.com/use-bleachbit-ubuntu/
- Published: 2019-07-15T16:39:25.000Z
- Updated: 2021-12-07T13:19:13.000Z
- Author: Sergiu
- Tags: Ubuntu, #Import 2022-12-26 08:27

[BleachBit](https://www.bleachbit.org/?ref=itsfoss.com) is a cross-platform, free and [open source tool for helping you get rid of junk files](https://itsfoss.com/ccleaner-alternatives-ubuntu-linux/) on your machine. It is powerful and easy to use, allowing you to not only delete junk files, but also to shred and wipe files. This is useful for keeping your keeping system clean and organized, as well as offering you well-deserved privacy.

In this article, I’m going to guide you through the installation process and show you how to make basic usage of BleachBit, while also including screenshots where needed.

**Note:** *I’ll be using* ***Ubuntu*** *, but the steps are similar for most Linux distributions.*

## Installing BleachBit on Ubuntu

The simplest way to install BleachBit is using the package manager or the software. Here you can search for **BleachBit** and when you find it, click on it and then press **Install**. Removing it is as simple as searching for it again and pressing **Remove**.

![BleachBit in Ubuntu Software Center](https://itsfoss.com/content/images/wordpress/2019/07/bleachbit_ubuntu_software_center.png?fit=800%2C369&ssl=1)

BleachBit in Ubuntu Software Center

If you are a terminal lover, you can [use apt command](https://itsfoss.com/apt-command-guide/) to install BleachBit:

```
sudo apt install bleachbit -y
```

However, the [Ubuntu repositories](https://itsfoss.com/ubuntu-repositories/) or the Software Center may not contain the latest version – which is **3.2**, at the time of updating this article.

So, to grab the latest version, you can head down to [official download page](https://www.bleachbit.org/download/linux?ref=itsfoss.com):

![BleachBit Download Page](https://itsfoss.com/content/images/wordpress/2019/07/bleachbit_download_page.png?fit=800%2C455&ssl=1)

Here, download the right package for your system (in my case it’s **Ubuntu 18.04 LTS**) by clicking on the corresponding link. It will download a .deb file.

[Installing packages from deb files](https://itsfoss.com/install-deb-files-ubuntu/) is simple. Simply double click on it and it will run in the software center. And, you can proceed to install it then.

## Using BleachBit to clean your system

[Subscribe to our YouTube channel for more Linux videos](https://www.youtube.com/c/itsfoss?sub%5Fconfirmation=1&ref=itsfoss.com)

Search for BleachBit and click on the **bleachbit** icon in the **Applications Menu**:

![Bleachbit in Applications Menu](https://itsfoss.com/content/images/wordpress/2019/07/bleachbit_in_applications_menu.jpg?fit=800%2C276&ssl=1)

Note

To run **BleachBit** with administrator privileges, click on the second icon (**BleachBit as Administrator/root)**.

And, depending on what you click on – the list of files will be different. So, if you don’t want to delete system junk files, you don’t need to launch the second one (**BleachBit as Adminstrator**).

Either of this methods should open up the **start screen**:

![Bleachbit Startscreen New](https://itsfoss.com/content/images/wordpress/2020/04/bleachbit-startscreen-new.jpg)

This is the Preferences menu and you can open it up at any time by clicking on the **menu icon** (top-right corner of the window) and then click **Preferences**.

Some **important options** include:

- **Overwrite contents of files to prevent recovery**: although slower, this will actually **shred** your files. Files are normally marked as deleted and allowed to be overwritten if there isn’t any space left. However, selecting this options will fill the space with junk (that will still act as a deleted file), making the shredded file irrecoverable. Keep in mind that this process is slower.
- **Languages**: here you can choose which languages to keep (although they don’t really take up that much space).
- **Drives:** in this sub-menu you can add directories where all free space should be replaced with junk (as when shredding files), making sure no file can be recovered from those locations.
- There’s a **dark mode** too!

Closing the **Preferences** menu will leave you in the **Main Menu**. In either case, you may end up directly on the main page of the app and can choose to check the preferences for advanced options.

![Bleachbit Main Screen](https://itsfoss.com/content/images/wordpress/2020/04/bleachbit-main-screen.jpg)

On the **left side**, you can select what type of files you want to delete (this includes system-wide files and application-specific files). Some of them require **administrator privileges** (such as APT cache and System-related options), and some of them will prompt warnings (such as Firefox warning you that your saved passwords will be deleted).

After making your selection, I suggest clicking on the **Preview** (the magnifying glass icon). This will show you exactly what is going to be deleted:

By pressing **Clean**, you are going to start the deleting process. You’ll get a message when **BleachBit** finishes:

![Bleachbit Task](https://itsfoss.com/content/images/wordpress/2020/04/bleachbit-task.png)

Another thing you can do is **quickly shred** or **wipe** a specific directory or file. You’ll find the options as shown in the screenshot below:

![Bleachbit Settings](https://itsfoss.com/content/images/wordpress/2020/04/bleachbit-settings.jpg)

With the new updates, BleachBit has also added an option to “**Make Chaff**“. For most of the users, it’s not a useful feature – but if you need a bunch of files with information to confuse digital forensics when finding traces on your computer, this could come in handy.

You can read more about it in their [official documentation](https://docs.bleachbit.org/doc/chaff.html?ref=itsfoss.com).

## Using BleachBit in command line

![Bleachbit Command Line Options](https://itsfoss.com/content/images/wordpress/2020/04/bleachbit-command-line-options.jpg)

As you can observe in the image above, you can do a lot of stuff through the terminal as well. You just need to type in “**bleachbit -help**” in the terminal know all the options and its usage.

For instance, to **list cleaners** run:

```
bleachbit -l
```

This will produce output in the vein of:

```
...
thunderbird.index
thunderbird.passwords
thunderbird.vacuum
transmission.blocklists
transmission.history
transmission.torrents
tremulous.cache
vim.history
vlc.mru
vuze.backup_files
vuze.cache
vuze.logs
vuze.tmp
warzone2100.logs
wine.tmp
winetricks.temporary_files
x11.debug_logs
xine.cache
yum.clean_all
yum.vacuum
...
```

Now you can run any cleaner or group of cleaners. For example:

```
bleachbit -c google_chrome* thunderbird.passwords
```

This command will delete all Google Chrome saved data and all saved Thunderbird passwords.

Similarly, you can utilize the –**\-wipe-free-space** command and others to make the most out of it. The CLI is useful because you can write bash scripts that execute BleachBit commands and you can even schedule cleaning actions using tools such as [cron](https://itsfoss.com/cron-job/).

**Wrapping Up**

There are other [ways to clean up Ubuntu](https://itsfoss.com/free-up-space-ubuntu-linux/) but having a dedicated GUI tool is always handy. Whether you are simply looking for a neat way to keep your system clean of any unnecessary data, optimizing your machine, or trying to keep your personal details safe, **BleachBit** is a tool that will surely come in handy, being so easy to get the hang of (while still being powerful).

Do you use any system cleaner? If so, which one and how? Let us know in the comments!