Developer project folders accumulate gigabytes of node_modules/, .venv/, target/, build/, and other build artifacts over time. Most of that disk space is regenerable junk that can be safely removed and restored with a single command.
Sweep scans your projects, compares the full project size against the artifact size, and shows you the exact percentage of junk in each project — then lets you reclaim it all interactively.
SWEEP — 11 projects | 19.0 GB reclaimable (93% junk)
PROJECT TYPE FULL SIZE ARTIFACTS % JUNK
────────────────────────────────────────────────────────────────────────────────
cloud-dashboard Next.js 13.1 GB 12.8 GB 97.7%
pulse-mobile Flutter 3.1 GB 3.0 GB 96.8%
nexus-admin Node.js 1.7 GB 1.6 GB 94.1%
microkit-api Next.js 580.0 MB 556.8 MB 96.0%
datastream-scraper Node.js 315.0 MB 310.2 MB 98.5%
────────────────────────────────────────────────────────────────────────────────
TOTAL 20.5 GB 19.0 GB 92.7%
You can reclaim 19.0 GB out of 20.5 GB (93% is junk)
[Space] select [a] all [Enter] delete [q] quit
cloud-dashboardis 13.1 GB, but 97.7% of that is justnode_modules/and.next/cache. The actual source code is only ~300 MB.
Installation
pip install sweep-cli
Usage
# Scan the current directory
sweep
# Scan a specific path
sweep ~/projects
# Dry run — display results without launching the interactive TUI
sweep ~/projects --dry-run
# Output results as JSON (useful for scripting)
sweep ~/projects --json
# Only show projects with 100 MB+ of artifacts
sweep --min-size 100MB
# Only show projects not modified in the last 6 months
sweep --older-than 6m
# Limit the scan depth
sweep --depth 3
Output Breakdown
For each detected project, Sweep displays:
| Column | Description |
|---|---|
| FULL SIZE | Total size of the entire project directory |
| ARTIFACTS | Total size of deletable build artifacts (node_modules/, .venv/, target/, etc.) |
| % JUNK | Percentage of the project that consists of regenerable artifacts |
In most cases, 80-98% of a project's disk usage is artifacts — files that are automatically regenerated by running npm install, pip install, cargo build, or equivalent commands.
Interactive TUI
Sweep includes a built-in interactive terminal interface for browsing and selecting projects:
| Key | Action |
|---|---|
↑ ↓ / j k |
Navigate the project list |
Space |
Toggle selection on the current project |
a |
Select all / deselect all |
s |
Sort by artifact size |
d |
Sort by last modified date (oldest first) |
n |
Sort alphabetically by name |
Enter |
Confirm and delete selected artifacts |
q / Esc |
Quit without deleting |
Color coding:
- Green — selected for deletion
- Red — project has uncommitted git changes (proceed with caution)
Supported Ecosystems
Sweep detects 10 ecosystems automatically:
| Ecosystem | Detected By | Artifacts Cleaned |
|---|---|---|
| Node.js | package.json |
node_modules/ |
| Next.js | next.config.* |
.next/, node_modules/ |
| Python | pyproject.toml, setup.py, requirements.txt |
.venv/, venv/, __pycache__/, .tox/, .mypy_cache/ |
| Rust | Cargo.toml |
target/ |
| Go | go.mod |
vendor/ |
| Java (Maven) | pom.xml |
target/ |
| Java (Gradle) | build.gradle |
build/, .gradle/ |
| .NET | *.csproj, *.sln |
bin/, obj/ |
| Flutter | pubspec.yaml |
build/, .dart_tool/ |
| Ruby | Gemfile |
vendor/bundle/ |
Git-Aware Safety
Sweep checks each project's git status before performing any deletion:
- Clean — no uncommitted changes; safe to delete artifacts
- Dirty — uncommitted changes detected; highlighted in red as a warning
- No git — projects without a git repository are displayed without a status indicator
All targeted artifacts (node_modules/, .venv/, target/, etc.) are fully regenerable and safe to remove. They can be restored at any time by running the appropriate install or build command.
How It Works
- Recursively walks the directory tree, looking for project marker files (
package.json,Cargo.toml,pyproject.toml, etc.) - Identifies the ecosystem and locates the corresponding artifact directories
- Calculates the full project size vs. artifact size to determine the junk percentage
- Checks git status for each project to flag uncommitted changes
- Presents results in a sortable, interactive TUI
- Deletes only the selected artifacts — source code is never modified or removed
Zero runtime dependencies — built entirely on the Python standard library (curses, os, shutil, argparse).
Support
If Sweep helped you reclaim disk space, consider supporting the project.
License
MIT
Metadata
Release files for sweep-cli 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sweep_cli-0.1.3.tar.gz | 15.9 kB | Without provenance | Details for sweep_cli-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sweep_cli-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for sweep_cli-0.1.3-py3-none-any.whl |
Total release size: 29.3 kB
Release files / sweep_cli-0.1.3.tar.gz
| Download URL | sweep_cli-0.1.3.tar.gz |
|---|---|
| Size | 15.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
937995fafd793683315d0e28fc7a910a936e783705448aaa29ec4cad200cf437
|
|
BLAKE2b-256 checksum How to use checksums |
fc8f160845a6f6be04f462c002bed028cf5713d202678a78ce712e3a3120bbd4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Release files / sweep_cli-0.1.3-py3-none-any.whl
| Download URL | sweep_cli-0.1.3-py3-none-any.whl |
|---|---|
| Size | 13.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
048d7783a151ad60a20cc868fc7b36a6ef8eaba73a3196e41534455ca81d0c8e
|
|
BLAKE2b-256 checksum How to use checksums |
84bf96c94545e214a3ec5dfcea9a6f704d4e264b4d311a0da5f5456a57ddd9c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Security for sweep-cli 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.