Skip to main content

junksweep

Find and clean junk directories — reclaim gigabytes.

A fast CLI tool that scans your projects for node_modules, __pycache__, .git, target, build, and other junk directories, shows how much space they waste, and optionally removes them.

pip install junksweep
junksweep ~/projects --clean

Why?

  • node_modules can be gigabytes per project
  • __pycache__ and .ruff_cache pile up silently
  • Rust target/ directories are huge
  • .next, build, dist take space after CI

One command to see it all. One prompt to clean it up.

Install

pip install junksweep

Usage

# Scan current directory
junksweep

# Scan a specific path
junksweep ~/projects

# Scan + prompt to delete
junksweep --clean

# Dry run (show what would be deleted)
junksweep ~/projects --dry-run

# Scan deeper (default: 3 levels)
junksweep --depth 5

# Only show dirs >= 50MB
junksweep --min-size 50

# Machine-readable output
junksweep --json

Default junk list

node_modules, __pycache__, .git, .next, .nuxt, build, dist, target, .cache, .turbo, Pods, .gradle, vendor/bundle, elm-stuff, deps, CMakeFiles, .tox, .eggs, .mypy_cache, .pytest_cache, .ruff_cache, .serverless and more.

Output example

      SIZE    DIR       PATH
──────────  ────────  ──────────────────────────────────────
  1.2GiB    node_modules  my-app/node_modules
340.0MiB    .next         webapp/.next
245.0MiB    target        rust-service/target
 42.0MiB    build         electron-app/build
 12.3MiB    __pycache__   api/__pycache__

──────────────────────────────────────────────────────────────
     Total:  1.8GiB across 5 directories

License

MIT

Metadata

Release files for junksweep 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for junksweep 1.0.0
File Size Uploaded
junksweep-1.0.0.tar.gz 6.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for junksweep 1.0.0
File Interpreter ABI Platform
junksweep-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.5 kB

Release files / junksweep-1.0.0.tar.gz

Download URL junksweep-1.0.0.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
94c04c2f72f5af3d481c5b3e052e50d1c4491a595b7bbcefe79019565fc5e5d5
BLAKE2b-256 checksum
How to use checksums
ab042443b13bfffcf2bdbe369337e146e08b6f4bbaf650e4db1cda7cc2b2c3ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / junksweep-1.0.0-py3-none-any.whl

Download URL junksweep-1.0.0-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9522c2e749b4ab3029f9922fe3968f5499fa4361ad59e53a38e83751d4a34b3b
BLAKE2b-256 checksum
How to use checksums
e40196a14d0bff4ebcb7f3152b41ee9852054164cda73683a249e22ecbe66058
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page