Skip to main content

cull

I ran WinDirStat one afternoon because my SSD was at 94% and found 74 GB of node_modules from projects I hadn't touched in over a year. Deleting them by hand is tedious. This does it for you.

devcull TUI demo

$ cull ~/projects
found 23 stale cache dirs totaling 61.3 GB

#    path                                        size      last commit
1    ~/projects/old-saas/node_modules           18.2 GB   14mo ago
2    ~/projects/prototype-v2/node_modules        9.4 GB   11mo ago
3    ~/projects/prototype-v2/.next               2.1 GB   11mo ago
...

> a
delete 23 dir(s) (61.3 GB)? [y/N]: y
freed 61.3 GB

install

pip install devcull

usage

cull [PATH]                  scan PATH (default: current dir)
  --older-than DAYS          only show caches untouched for N days (default: 90)
  --min-size MB              skip caches smaller than N megabytes
  --delete                   interactively pick what to remove
  --all                      delete everything found without asking
  --dry-run                  show what would go, don't touch anything
  --report FILE              write findings to a JSON file

.cullignore

Drop a .cullignore file in your projects root to protect specific directories:

# keep this one — it's a monorepo with shared deps
my-shared-lib/node_modules

# ignore all .venv dirs
.venv

Patterns match against the directory name or its path relative to the scan root.

what it looks for

  • node_modules, .next, .nuxt, .svelte-kit, .parcel-cache, .turbo
  • .venv, venv, .virtualenv, .tox
  • __pycache__, .pytest_cache, .mypy_cache, .ruff_cache
  • dist, build, out (inside project directories)
  • .gradle, .angular, .sass-cache
  • target (only inside Rust or Maven projects)

what it won't do

It won't scan for "large files" generically. It won't suggest you delete your Downloads folder or anything outside the above list. The whole point is that it only removes things you can safely recreate by running npm install or pip install again.

It also won't run automatically or add itself to your startup. You run it when you want to run it.

"last commit" column

cull tries to find the last git commit in the parent project. If there's no git repo, it falls back to the directory's modification time. The commit date is more reliable — copying files around updates mtime but doesn't change when you actually worked on the project.

license

MIT

Metadata

Release files for devcull 0.3.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 devcull 0.3.0
File Size Uploaded
devcull-0.3.0.tar.gz 11.3 kB Details

Built distribution (wheel)

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

Total release size: 21.7 kB

Release files / devcull-0.3.0.tar.gz

Download URL devcull-0.3.0.tar.gz
Size 11.3 kB
Tags Source
SHA-256 checksum
How to use checksums
7a82fd4d370f45c150e1117311659c853bbc0469cc753cdc77ce2c7ea6897491
BLAKE2b-256 checksum
How to use checksums
beced998c8768875a307a9ed91508716c4227a9533cc80a73e384838827238ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Release files / devcull-0.3.0-py3-none-any.whl

Download URL devcull-0.3.0-py3-none-any.whl
Size 10.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
51a73db0ca0ae63aae6c5cceb5d0719430cc8c25a006e8e3e399f4a2049dc72f
BLAKE2b-256 checksum
How to use checksums
7ac11d5d1c3833ddb59867105e62b6e330b65031bbcdb524266f07f6f6a1c766
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.0

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