How to Clean Headless Servers with BleachBit's New TUI Interface

By

Introduction

BleachBit, the well-known open-source system cleaner, has introduced a text-based user interface (TUI) as an optional alternative to its standard graphical frontend. While the existing command-line interface (CLI) is designed for non-interactive scripting, the new TUI is fully interactive. You navigate it with your keyboard (with limited mouse support) to select, preview, and remove unnecessary files. This makes BleachBit an ideal tool for headless Linux servers managed remotely, as well as lightweight desktop systems where adding GTK dependencies isn't desirable. Currently in alpha, the TUI runs on the same backend as the GUI, ensuring consistent cleaning power. This guide will walk you through setting up and using BleachBit's TUI on a headless server.

How to Clean Headless Servers with BleachBit's New TUI Interface
Source: www.omgubuntu.co.uk

What You Need

Step-by-Step Guide

Step 1: Install BleachBit with TUI Support

First, ensure your system is updated. Then install BleachBit using your package manager. The TUI is included in standard packages from version 4.6.0 onward. For Ubuntu/Debian, run:

sudo apt update
sudo apt install bleachbit

For other distributions, use dnf (Fedora), zypper (openSUSE), or compile from source. Verify installation with bleachbit --version. If you need the latest alpha, check the official website.

Step 2: Access the TUI

Unlike the GUI, the TUI launches directly from the terminal. Connect to your headless server via SSH. Then run:

bleachbit --tui

If the flag isn't recognized, ensure you have the correct version. The TUI will open as a full-screen interactive interface. You can also set an alias for convenience:

alias bleachbit-tui='bleachbit --tui'

Step 3: Navigate the Interface

The TUI uses keyboard shortcuts. Use the arrow keys to move between categories and items. Press Tab to switch between panes (e.g., categories list and details). Spacebar toggles selection of an item. Enter expands or collapses a category. Esc returns to previous screen or exits. Limited mouse support exists: you can click on buttons and checkboxes. Familiarize yourself with the layout:

Step 4: Preview and Select Items to Clean

Before cleaning, preview to see what will be removed. Navigate to a category, select one or more items with Spacebar, then press F5 or click Preview. This calculates space to be freed and lists files. Review carefully—some items (like browser caches) might be needed. To deselect, press Spacebar again. Continue selecting across categories.

How to Clean Headless Servers with BleachBit's New TUI Interface
Source: www.omgubuntu.co.uk

Step 5: Clean Your Server

Once satisfied with your selection, press F6 or click Clean. Confirm the action if prompted. The TUI will remove the files and show progress. After completion, you'll see a summary of space freed. You can repeat steps 3-5 for different categories. The TUI supports undo for some operations (if enabled). To exit, press Esc or click Quit.

Step 6: Use TUI for Remote Headless Servers

Since the TUI runs entirely in the terminal, you can manage servers via SSH without a GUI. This is ideal for headless servers where you need interactive cleaning without installing X11 or GTK. The low dependencies make it suitable for lightweight environments. You can also run multiple instances or script periodic cleanups using the CLI (non-interactive) while using the TUI for manual, detailed cleanups. Remember to run with appropriate privileges (sudo bleachbit --tui) to clean system-wide temporary files.

Tips for Best Results

BleachBit's TUI brings powerful interactive cleaning to headless servers without bloat. By following these steps, you can free up disk space, improve performance, and maintain your server's health—all from the command line.

Tags:

Related Articles

Recommended

Discover More

How to Benchmark ROCm Performance Gains on AMD Radeon AI PRO R9700Artemis II Crew and 'Rise' Zero Gravity Indicator Visit WashingtonBritish Cybercriminal 'Tylerb' Admits Role in Scattered Spider's Sophisticated Phishing and Crypto TheftsBreaking: Agrivoltaics Hailed as Game-Changer for Renewable Energy and Agriculture — But Experts Warn Details Are CriticaliOS 27 Overhauls Camera with Customizable Controls, Refines Weather, Safari, and Interface Design