~/projects folder quietly grows into a graveyard of node_modules and .venv directories from old experiments, abandoned side projects, and long-forgotten client repos. These directories are notorious for their size — a single node_modules folder can easily exceed 500 MB, and a Python virtual environment isn’t far behind. Multiply that by dozens of projects and you can find yourself short on disk space without a clear culprit.
This guide walks you through using Toolkit to scan your projects directory, preview exactly how much space you can reclaim, and safely purge the directories you no longer need.
Step-by-Step Cleanup
1
Scan your projects folder
Start by running a scan against your projects directory. Toolkit recursively walks the directory tree and identifies every For each discovered directory, the scan output shows:
node_modules, .venv, venv, env, and conda folder it finds.- Path — the full filesystem path to the environment
- Size — the amount of disk space consumed
- Type — whether it’s a
node_modulesor a Python virtual environment (venv,.venv,conda, etc.) - Status — whether the environment is orphaned (no associated manifest file detected)
2
Preview what will be removed
Before deleting anything, run the purge in dry-run mode. This calculates and displays the total space to be recovered and lists every directory that would be deleted — without touching a single file.The dry-run output summarizes the operation:Nothing is deleted at this stage. The exit code reflects whether the command succeeded, so you can use this safely in CI checks.
3
Review the list carefully
Go through the list before committing to the purge. Pay special attention to any entries marked as orphaned — these are environments where Toolkit found no corresponding
package.json, pyproject.toml, or requirements.txt in the parent directory. They are the safest targets for cleanup.For entries that are not orphaned, verify that you can restore those dependencies by re-running your package manager (npm install, pip install -r requirements.txt, etc.) before deleting them. If you’re unsure, exclude that project path for now.4
Run the purge
Once you’ve reviewed the dry-run list and are confident in the selections, run the actual purge. Use Toolkit deletes each directory and prints a running total as it frees space:
--force to skip the manual confirmation prompt.5
Verify the cleanup
Run the scan one more time to confirm all targeted directories have been removed:If the purge was successful, you should see an empty results table or a significantly reduced list — confirming that the space has been reclaimed.
Orphan Detection
Toolkit automatically marks an environment as orphaned when it cannot find a recognized project manifest in the same directory. The following manifest files are used as indicators of an active project:
- Node.js:
package.json - Python:
pyproject.tomlorrequirements.txt
node_modules or virtual environment folder, Toolkit flags the directory as an orphan — a strong signal that the project is abandoned and the environment is safe to remove.Adjusting Scan Depth
By default, Toolkit recurses up to 5 directory levels deep when scanning. For large or deeply nested project trees, you can tune this with the--depth flag: