LinuxCommandLibrary

bleachbit

Securely delete files and clean system

TLDR

Start the graphical user interface (GUI) version of Bleachbit

$ bleachbit --gui
copy

Shred a file
$ bleachbit [[-s|--shred]] [path/to/file]
copy

List available cleaner options
$ bleachbit [[-l|--list-cleaners]]
copy

Preview the files that will be deleted and other changes that will be made before actually performing the clean-up operation
$ bleachbit [[-p|--preview]] --preset [cleaner1.option1 cleaner2.option2 ...]
copy

Perform the clean-up operation and delete files
$ bleachbit [[-c|--clean]] --preset [cleaner1.option1 cleaner2.option2 ...]
copy

SYNOPSIS

bleachbit [OPTIONS] [CLEANER_OPTIONS...]

Examples:
bleachbit --list-cleaners
bleachbit --preview firefox.cache system.tmp
bleachbit --clean firefox.cache system.tmp
bleachbit --delete --preset

PARAMETERS

--clean CLEANER [CLEANER...]
    Execute the specified cleaning operations. CLEANER refers to specific cleaning options like firefox.cache or system.tmp.

--list-cleaners
    Display a list of all available cleaning options, categorized by application.

--preview [CLEANER...]
    Show files that would be deleted without actually performing the deletion. Essential for reviewing before cleaning.

--delete
    Execute the deletion. This option is typically used in conjunction with `--clean` or `--preset`.

--preset
    Use the predefined set of cleaning options, which can be configured within the GUI or via configuration files.

--wipe-free-space
    Securely wipe the free disk space on selected partitions, making previously deleted data unrecoverable. This can be time-consuming.

--overwrite
    When cleaning, overwrite the files with random data before deleting, further preventing recovery.

--shred
    Shred files and directories to prevent recovery. This is applied to individual files specified as arguments or by certain cleaners.

--shred-sqlitedb
    Shred SQLite databases (e.g., browser histories, cookies) to securely remove sensitive data.

--vacuum
    Vacuum SQLite databases to rebuild them, reclaiming unused space and potentially improving performance.

-v, --version
    Display the version information of BleachBit.

-h, --help
    Display a comprehensive help message with all available options.

DESCRIPTION

BleachBit is a free and open-source system cleaner designed to free up disk space and protect your privacy on Linux systems. It effectively identifies and removes various types of unnecessary files, including web browser caches, cookies, history, temporary files, broken shortcuts, and system log files.

The command-line interface (CLI) of bleachbit allows for powerful automation and scripting, making it ideal for scheduled cleanups or server environments where a graphical interface is not available. Beyond basic file deletion, bleachbit offers advanced privacy features such as shredding files to prevent data recovery and wiping free disk space to erase remnants of previously deleted files. It supports a wide array of applications, from popular web browsers (like Firefox and Chrome) to system components and various desktop applications. Users are strongly encouraged to use the `--preview` option before committing to a deletion, minimizing the risk of accidental data loss. Its primary goal is to provide a robust solution for maintaining system hygiene and enhancing digital privacy by efficiently removing digital clutter.

CAVEATS

Use with extreme caution! BleachBit can permanently delete important files if not used carefully. Always use the `--preview` option before performing any deletion, especially when dealing with system-wide cleaners. Deleting critical system files or necessary application data can lead to system instability, application malfunctions, or even prevent your operating system from booting. Wiping free space or shredding large files can be a very time-consuming operation, depending on disk size and speed. It is primarily a data deletion tool, not a full security suite for malware removal or network protection.

<B>CLEANERS AND CATEGORIES</B>

The command-line interface of bleachbit allows you to specify 'cleaners' in the format category.option, for example, system.tmp for temporary system files or firefox.cache for Firefox's cache. You can use `--list-cleaners` to see all available options specific to your installed applications.

<B>GUI VS. CLI</B>

BleachBit offers both a graphical user interface (GUI) for ease of use and a command-line interface (CLI) for scripting and automation. While the GUI provides visual feedback and simpler navigation, the CLI is powerful for batch operations and integration into larger scripts.

HISTORY

Developed by Andrew Ziem and first released in 2008, BleachBit was conceived as a privacy-focused system cleaner, often cited as an open-source alternative to proprietary tools like CCleaner for Windows. While initially featuring a strong graphical user interface (GUI), its command-line interface (CLI) was developed to enable scripting and automation for server environments and advanced users. The tool gained significant public attention and usage in political contexts for its ability to securely wipe sensitive data.

SEE ALSO

rm(1), shred(1), find(1)

Copied to clipboard