node_modules, .venv, target and vendor are the largest directories on most
developers' machines, and the least valuable: every byte in them is described by a
lockfile that is already committed. A project you have not opened since March is holding
gigabytes hostage for a build you are not running.
dev-prune finds those directories across every Git repository you register, and deletes
them — but only after proving the exact command that puts them back would succeed. It
knows thirty-six package managers, not just the obvious four: Composer, Bundler, Mix,
CocoaPods and Terraform are as first-class as npm and pip. It is one Rust program,
installs its own background schedule, and answers to two names you type — dev-prune and
devp — alongside a third, windowless build, devpw, that exists only so the Windows
scheduled task runs without flashing up a console.
Deleting is only half of it. The same binary puts everything back (devp restore --last-run), sizes and clears the caches those package managers keep outside your
projects (devp caches), reports what Docker is holding (devp caches docker), and shows
where the disk actually went, drive by drive (devp status, devp stats). One tool for
every dependency directory on the machine, instead of one command per ecosystem and a
mental note about which ones are safe.
[!IMPORTANT]
The rule the whole tool is built around: nothing is deleted unless dev-prune has
just verified, read-only, that its lockfile can rebuild it. There is no flag to skip
that check. --ignore-idle lifts the idle-day wait and nothing else.
And it puts everything back
The second half of the clip above is the part that makes deleting safe to try. After a
pass, devp restore --last-run rebuilds exactly the directories that pass removed, in
every repository it touched, using each project's own package manager (npm ci, pnpm install --frozen-lockfile, uv sync, and so on). devp restore . does the same for
one project. The clip shows node_modules coming back from the lockfile; Rust target/
directories are not reinstalled, cargo rebuilds them on your next build.
devp history --pass 1, then devp restore --last-run: node_modules comes back from the lockfile. The real binary, in a throwaway clone; the long npm wait is cut. How it was recorded.