Skip to main content

remove stale dev cache directories

Project description

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.

$ 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 cull

usage

cull [PATH]                  scan PATH (default: current dir)
  --older-than DAYS          only show caches untouched for N days (default: 90)
  --delete                   interactively pick what to remove
  --all                      delete everything found without asking
  --dry-run                  show what would go, don't touch anything

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

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

devcull-0.1.0.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

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

devcull-0.1.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file devcull-0.1.0.tar.gz.

File metadata

  • Download URL: devcull-0.1.0.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for devcull-0.1.0.tar.gz
Algorithm Hash digest
SHA256 10f2f7d430980feec264554a0c5038a8737438919e097d3f7556fb6ed565ee3c
MD5 08a4864875496253d3f251c16a044414
BLAKE2b-256 9c4cb367bc65568ed8c4a1095f937b86b240947692eba05fc28ae506f4da8376

See more details on using hashes here.

File details

Details for the file devcull-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: devcull-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.12

File hashes

Hashes for devcull-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d09cb4cbbfbae06b5d339880db050bf8e9abf68bd4eca1f4834c06b05a9007ab
MD5 6ebc66833edd279fb9d43584a275a8c6
BLAKE2b-256 ade9aab2c26b75f0c847390f3a24335f83a1222d805526119e87b26d22f7708b

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