What Is It
Project Cleanup recursively browses one or more directories to find code projects in several languages. If the project hasn't been modified for more than a month, it will remove directories containing libraries, dependencies, builds, etc.
These files can be retrieved or re-generated at any time, but if you haven't worked on the project for a month, chances are you don't need them taking up space on your hard drive right now.
Currently the tool will detect Node.js, Rust and Java projects.
How To Install
Download the latest build for your platform from the Github releases.
If you have Rust v1.35+ installed, you can use Cargo to install the application.
cargo install project-cleanup
Prefer another way to install your software? Open an issue to discuss publishing project cleanup on package managers or package repositories.
How To Use
Simply call project-cleanup with the path to a directory containing one or more code projects. This can be a relative or an absolute path.
You can also cleanup multiple directories at once
project-cleanup ./one ./two
Cleanup All Projects
By default, only projects that haven't been modified in more than a month will be cleaned.
--all to ignore the last modified date, and cleanup all projects.
project-cleanup --all ./recent-projects
You will always have to confirm before anything is deleted, as a safety measure in case
the tool detects the wrong directories. However, in some environments that may not be
the desired behaviour, so you can use
--force to disable user confirmation.
project-cleanup --force ./its-ok-i-have-backups
--ignore to set a regex pattern for directories to ignore.
Note: this pattern will match on the entire path, not just the directory name.
project-cleanup --ignore test ./my-projects
With this command, if given directories named "test", "test1", "new-test" and "foo", only "foo" will be cleaned.