linux-cleanup
com.aoneahsan.linuxcleanup
Linux Cleanup is a safe, modular Bash CLI (shipped on npm) that reclaims 10โ50+ GB of regenerable developer junk โ package-manager caches, browser caches, Gradle/Cypress/Playwright/Android assets, and stale node_modules โ behind allowlist-based safety guards, with JSON session reports and Markdown/HTML export.
At a glance
- Category
- other
- Status
- Live
- Started
- May 2026
- Last updated
- 35 minutes ago
Identifier
com.aoneahsan.linuxcleanupPreview
Take a look before you go
The still below is painted first, then the running site loads behind it โ so the dialog is never an empty rectangle waiting on a network round trip. Where a site allows framing the live app takes over; where it refuses, the still stays and says so. Nothing is requested until you press.
About
What this actually is
Storage fills up in places you never look.
Thumbnails, package caches and old logs build up behind ordinary work. Some of it regenerates on its own. Some paths need care. A single "clean" button cannot explain the difference, and a full disk tells you very little about what can safely go.
linux-cleanup is built around the order of those decisions: look, check, then decide.
The first step reads. linux-cleanup --scan lists the candidate paths and touches nothing. The second step walks. A cleanup mode run with --dry-run goes through its proposed steps without deleting a file. Only the third step, a real cleanup, removes anything, and that removal is permanent.
That last word matters, so it is said plainly on the site and in the tool.
There is no undo after removal. linux-cleanup does not move deleted files to the Trash and does not make a backup. A run produces a report of what was selected, what was removed or skipped, and any refusals or errors. A report is not an undo, and it never pretends to be one.
Personal files are not cleanup material. Routine cache cleanup is designed around regenerable material, and the preview names its candidate paths before you choose a mode.
The command line keeps its modes separate, so the command names the work it will do. Cache is regenerable local cache. Logs is old diagnostic output. System covers apt and dpkg in the current release, which is also a limit worth knowing: on a distribution that does not use them, check mode-specific support before running the system path.
The desktop app runs the same cleanup in a window.
Version 1.0.5 is available for x86_64 Linux as an AppImage or a .deb. It runs a dry run before every real run and gives a receipt after it. The command line streams local JSON events for scans and the all-safe cleanup, and the window is built on that same stream, so the two cannot describe the same run differently.
The command line, version 2.1.1 on npm, is MIT-licensed and runs with npx. The source is public on GitHub, so every path rule can be read before it is trusted.
The website follows the same rule. Its interactive survey lets you move an example path between "propose" and "keep" and watch the decision change, but it is illustrative only: it reads no files on your machine and removes nothing. A preview that quietly scanned your disk would break the promise the tool is built on. The site reads in ten languages, and the desktop app keeps its own language setting.
Without a preview, a full disk leads straight to guessing what is safe to delete. With named paths and a dry run, there is a chance to inspect the proposed work first, and the answer comes before the action.
Why build it this way?
Because the expensive mistake in disk cleanup is not leaving a cache behind. It is deleting the one folder that cannot be regenerated. Every step before the real run exists so that a person sees the path, and the decision stays close to it.
linux-cleanup sits beside macleanup and windowsweep, the same refusal-first idea for macOS and Windows. Each tool is written for its own operating system rather than shared through a lowest common denominator.
What it looks for is what a developer machine actually piles up: the Yarn and pnpm stores, Gradle wrapper distributions, Cypress and Playwright browser binaries, Android emulator images, Flutter's pub-cache, node_modules folders for projects finished long ago, orphan downloads, system journals and superseded kernels.
It prunes rather than wipes. For every cache target, only files whose access time and modification time are both older than the threshold are removed, and the default threshold is 100 days. A cache you used last week survives, so the next build does not have to download it all again.
The refusal list is fixed in code. safe_rm rejects any path that resolves inside ~/Documents, ~/Pictures, ~/.ssh, ~/.gnupg, ~/.config, /etc, /boot, /usr or bare $HOME, and no flag bypasses it. Paths are resolved with realpath before the guard runs, so a symlink into a protected directory cannot carry a deletion past it.
It runs on Linux only, WSL2 included, with bash 4 or newer and GNU coreutils; npm refuses to install it on macOS or Windows. The packed install is about 84 kB. It is not the tool for anyone who wants an undo or a backup, a point-and-click interface as the main way in, or a security scanner.
Worth knowing
- Allowlist over blocklist โ the tool refuses unrecognized paths rather than trying to enumerate dangerous ones; `safe_rm` is the single chokepoint every deletion passes through.
- Prunes by staleness, doesn't just wipe โ since 1.2.0 the default protects assets that look like junk (Gradle wrapper distros, pinned-dependency tarballs, pre-release Cypress/Playwright binaries) by requiring both atime and mtime to be older than `--days`.
- Byte-identical npm and git โ the npm package is just a thin Node launcher over the same Bash source; npx routes logs/reports to a persistent `~/.linux-cleanup/` so they survive cache eviction.
- Zero network code path โ verifiable by `grep -rE "curl|wget|nc|http"` returning only the author's banner URLs and comments; no telemetry, analytics, or phone-home.
- Personal data is interactive-only โ no flag combination, including `--yes`, will silently delete personal files; `--yes` applies to regenerable caches only.
- Crash bundles are opt-in to send โ failures are captured locally and a one-liner is printed, but nothing leaves the machine unless the user emails it.
- All output stays inside the project / `~/.linux-cleanup/` โ nothing is written to `/var` or scattered across `$HOME`.
- Honest licensing note in the README โ it explicitly states the tool is source-available, NOT OSI open source (modification and commercial use are prohibited), and is a deleter, not a backup or security tool.
Built with
- Bash
- Node.js
- npm / npx
- Linux
- apt / dpkg
- Tauri
- Rust
- React
- TypeScript
- Vite
Key features
What it does, and what that costs to build
Each of these is a capability the stack genuinely provides. None of them is an outcome nobody measured โ there is no "cut onboarding by 40%" on this page, because no one measured onboarding.
- Read-only scan that lists candidate paths and removes nothing
- Dry run that walks the proposed steps without deleting files
- Separate cache, logs and system modes, each named by its command
- A report after every run: selected, removed or skipped, refusals and errors
- Desktop app 1.0.5 for x86_64 Linux as an AppImage or a .deb
- A dry run before every real run in the desktop app, and a receipt after it
- Local JSON event stream shared by the command line and the window
- MIT-licensed command line, run with npx
Screenshots
5 slots, none of them filled in yet
These are designed frames, not pictures. Each one records what belongs in the slot and at what width; the capture itself is taken from the running app. Drawing a fake screenshot here would put an image on the site that no build has ever produced.
Timeline
Still being worked on
May 2026
Work started
The earliest month on record for linux-cleanup.
Nov 2026
Last change
Status is completed โ 35 minutes ago. Ongoing, so this row moves whenever something lands.
Questions
Common questions
The questions that actually arrive, answered in the first sentence.
- Does the scan delete files?
- No. --scan only reads candidate paths, and a cleanup mode run with --dry-run walks its proposed steps without deleting files.
- Can I undo a cleanup?
- No. A real removal is permanent; linux-cleanup does not move files to the Trash or create a backup.
- Is there a desktop app?
- Yes. Version 1.0.5 runs on x86_64 Linux, as an AppImage or a .deb, from the download page.
- Does it work on every Linux distribution?
- The cache and logs modes are general; the current system-cleanup path uses apt and dpkg. Check mode-specific support before using the system path on another distribution.
- Is it open source?
- Yes. The command line is MIT-licensed, published on npm as linux-cleanup and on GitHub.
- What does it delete by default?
- Only cache files whose access and modification times are both more than 100 days old. Paths inside your personal directories, ~/.ssh, ~/.config, /etc, /boot and /usr are refused, and no flag lifts that refusal.
Keep looking
More tools and experiments
- NA
Native Update
com.aoneahsan.nativeupdate
Over-the-air updates for Capacitor apps โ bundle signing, staged rollout, and automatic rollback when a bundle fails to boot twice.
- ST
Strata Storage
com.aoneahsan.stratastorage
One storage API across localStorage, IndexedDB, cookies, the URL, native Keychain and Keystore, SQLite and the filesystem. Zero dependencies.
- CA
Capacitor Auth Manager
com.aoneahsan.capacitorauthmanager
Framework-agnostic TypeScript authentication library unifying 15 OAuth, passwordless, credential, and biometric sign-in flows behind one provider-less API.