Skip to main content

Find and clean junk directories (node_modules, __pycache__, .git, target, build, etc.)

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

junksweep-1.0.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

junksweep-1.0.0-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file junksweep-1.0.0.tar.gz.

File metadata

  • Download URL: junksweep-1.0.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for junksweep-1.0.0.tar.gz
Algorithm Hash digest
SHA256 94c04c2f72f5af3d481c5b3e052e50d1c4491a595b7bbcefe79019565fc5e5d5
MD5 c8110bd80c10437543e73c85f879ccc1
BLAKE2b-256 ab042443b13bfffcf2bdbe369337e146e08b6f4bbaf650e4db1cda7cc2b2c3ed

See more details on using hashes here.

File details

Details for the file junksweep-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: junksweep-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for junksweep-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9522c2e749b4ab3029f9922fe3968f5499fa4361ad59e53a38e83751d4a34b3b
MD5 4f816a6534cabcafd3cc0b624f3f8f51
BLAKE2b-256 e40196a14d0bff4ebcb7f3152b41ee9852054164cda73683a249e22ecbe66058

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page