用 bleachbit 命令行清理磁盘和隐私痕迹

先列出可用清理项,再从终端清除缓存、日志和操作痕迹——可按用户清理,加 sudo 即可清理系统级文件。

Linux清理BleachBit命令行安全中风险
先执行 bleachbit --list 查看清理项,再执行 bleachbit --clean system.tmp firefox.cache 释放空间(系统级文件需加 sudo)。

01命令

命令
$ bleachbit --list | head && bleachbit --clean system.tmp firefox.cache

02作用说明

BleachBit 了解几十种应用存放垃圾文件的位置——浏览器缓存、崩溃日志、缩略图、最近使用记录等,--clean 会精确清除你指定的类别。清理前务必先运行 --list 并用 --preview 预览,因为有些选项会删掉你可能还需要的东西,比如保存的密码或 Cookie。与通用的磁盘清理脚本不同,它还提供文件粉碎和空闲空间擦除等隐私功能,并且完全可以写进 cron 定时执行。

03风险

风险中风险
使用条件bleachbit (sudo apt install bleachbit / sudo dnf install bleachbit); prefix with sudo to clean system-level files
!注意: 清理立即生效且不可恢复——清除浏览器 Cookie 或使用'深度扫描'可能导致网站登出或误删数据;切勿凭猜测填写清理项名称,先列出并预览。

04撤销

✓无需撤销——该命令不会改变持久状态。

05来源

  • BleachBit Command Line Interface — Official Documentation
    BleachBit · vendor-doc · 2026-09-17
    依据: Documents bleachbit --list to show available cleaners and --clean cleaner.option to wipe the selected items headlessly.
  • BleachBit — README
    BleachBit project (GitHub) · vendor-doc · 2026-09-17
    依据: Official readme: BleachBit frees disk space and guards privacy by cleaning caches, cookies, log files and shredding files.

最后验证: 2026-09-18 · 分类: 安全与隐私

06相关方案