Reduce the disk usage of your projects by removing old dependencies & builds

Download Documentation View on Github

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.

Supported Languages

Currently the tool will detect Node.js, Rust and Java projects.

How To Install

Download

Download the latest build for your platform from the Github releases.

Rust

If you have Rust v1.35+ installed, you can use Cargo to install the application.

cargo install project-cleanup

Other

Prefer another way to install your software? Open an issue to discuss publishing project cleanup on package managers or package repositories.

How To Use

Basic Usage

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.

project-cleanup /path/to/projects/directory

Multiple Directories

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. Use --all to ignore the last modified date, and cleanup all projects.

project-cleanup --all ./recent-projects

Force Delete

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 Paths

Use --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.