- Joined
- Feb 23, 2023
- Messages
- 285
This script is a **safe, universal cleanup tool** for Linux that helps keep your system fast, lean, and clutter-free.
It automatically detects your package manager and performs a targeted cleanup of system packages, caches, logs, and user-level files.
Optional features let you also clean Steam shader caches, Docker unused resources, and more — all without breaking your system.
🛠 Purpose
- Maintain system performance by removing unnecessary files and caches.
- Free up disk space across different Linux distributions.
- Provide consistent cleanup behavior, whether you use Debian/Ubuntu, Fedora, Arch, openSUSE, Alpine, or rpm-ostree.
- Offer both safe defaults for beginners and powerful flags for advanced users who want deeper cleaning.
- **New Linux users** who want a simple, copy-and-paste way to safely clean their system.
- **Experienced users** looking for a quick, repeatable cleanup process across multiple distros.
- **Gamers & developers** who need to manage large caches from Steam, development tools, and package managers.
- **Admins & testers** maintaining multiple Linux environments and wanting a universal cleanup tool.
You can view the latest version of this script on GitHub here:
https://github.com/XsMagical/Linux-Tools/tree/main/scripts/cleanup
- Debian / Ubuntu (APT)
- Fedora / RHEL (DNF / dnf5)
- Arch / Manjaro (Pacman)
- openSUSE (Zypper)
- Alpine (APK)
- rpm-ostree (Silverblue, Kinoite, etc.)
⚠ Notes
- Safe-by-default — only cleans more aggressively when you add optional flags.
- Keeps a log in
~/cleanup_logsfor every run. - Does not remove kernels unless specifically instructed via the kernel prune option.
- All repo scripts are intended to live under
~/scriptsfor easy re-use.
Enjoy your cleaner, faster Linux system!