Analysis updated 2026-05-18
Find every Cargo target/ folder on your system and reclaim gigabytes of disk space with a few keystrokes.
Scan a specific development directory for target/ folders and see their sizes sorted from largest to smallest.
Use --list mode to pipe Cargo target folder paths to a shell script for automated cleanup.
Clean up build artifacts across many old Rust projects without manually navigating each project directory.
| m4cs/targkill | abyo-software/ferro-stash | ariasbruno/glyph | |
|---|---|---|---|
| Stars | 1 | 1 | 1 |
| Language | Rust | Rust | Rust |
| Setup difficulty | easy | moderate | easy |
| Complexity | 1/5 | 4/5 | 2/5 |
| Audience | developer | ops devops | developer |
Figures from each repo's GitHub metadata at analysis time.
targkill is a command-line tool for Rust developers that finds every target/ build folder on your system and shows you how much space each one is using. When you build Rust projects, the compiler stores compiled artifacts in a folder called target/. These folders can grow to several gigabytes per project and are safe to delete at any time since Cargo regenerates them on the next build. targkill makes it easy to find them all and reclaim the space. You install it with cargo install targkill, which adds it as a Cargo subcommand. Running cargo targkill opens a terminal interface that scans your home directory (or a folder you specify) and lists every Cargo target folder it finds with its size. Sizes appear as they are calculated, so you do not have to wait for the full scan before seeing results. The list highlights any folder over one gigabyte so the largest ones are immediately visible. The tool is careful about what it includes: it only lists a target/ folder if a Cargo.toml file exists next to it. A folder named target/ for another reason is ignored. This keeps the results accurate and avoids touching unrelated directories. In the terminal interface, you navigate with arrow keys or vim-style j/k keys, toggle individual items with Space, select or deselect everything, sort by size, name, or age, and delete the selection. Deletions are permanent with no recycle bin, but a confirmation prompt appears before anything is removed. Deletions run in the background so the interface stays responsive even when removing large folders. A --list option prints results as plain text for use in scripts. The tool runs on Linux, macOS, and Windows.
A Rust CLI tool with a live terminal UI that finds all Cargo target/ build folders on your system, shows their sizes as they are computed, and deletes the ones you select to reclaim disk space.
Mainly Rust. The stack also includes Rust, Cargo, ratatui.
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.