#cleanup #command-line #project #command-line-tool

app projclean

Project dependencies & build artifacts cleanup tool

12 releases (7 breaking)

0.8.0 Jan 12, 2024
0.7.0 Dec 19, 2023
0.6.0 Mar 1, 2023
0.5.0 Jul 1, 2022
0.1.3 Mar 31, 2022

#566 in Command line utilities

Download history 11/week @ 2023-12-13 3/week @ 2023-12-20 15/week @ 2024-01-10 63/week @ 2024-02-21 39/week @ 2024-02-28 11/week @ 2024-03-13

63 downloads per month




CI Crates

Project dependencies & build artifacts cleanup tool.



With cargo

cargo install projclean

Binaries on macOS, Linux, Windows

Download from Github Releases, unzip and add projclean to your $PATH.


Usage: projclean [OPTIONS] [RULES]...

  [RULES]...  Search rules, e.g. node_modules target@Cargo.toml

  -C, --cwd <DIR>         Start searching from <DIR> [default: .]
  -x, --exclude <DIR>     Exclude directories from search, e.g. ignore1,ignore2
  -t, --time <[+|-]DAY>   Path was last modified less than, more than or exactly <DAY> days
  -s, --size <[+|-]SIZE>  Path uses less than, more than or exactly <SIZE> units (K|M|G|T) of space
  -D, --delete-all        Automatically delete all found targets
  -P, --print             Print the found targets
  -h, --help              Print help
  -V, --version           Print version

Clean up node_modules.

projclean node_modules

Clean up various types of projects.

projclean node_modules target@Cargo.toml

Start searching from a specific directory with -C or --cwd

projclean -C $HOME node_modules       # equal to `cd $HOME && projclean node_modules`

Find node_modules with the latest updates over 30 days and occupy more than 1G disk space.

projclean node_modules --time +30 --size +1G

Search Rule

Projclean find targets according search rule.

Rule consist of two parts:

project rule
nodejs node_modules
cargo target@Cargo.toml
maven target@pom.xml
gradle .gradle,build@build.gradle,build.gradle.kts
cmake build@CMakeLists.txt
composer vendor@composer.json
dotnet bin,obj@*.csproj,*.fsproj
vs .vs,Debug,Release@*.sln
vc++ Debug,Release@*.vcxproj
swift .build,.swiftpm@Package.swift
pod Pods@Podfile
pub .dart_tool,build@pubspec.yaml
sbt target,project/target@build.sbt
jupyter .ipynb_checkpoints@*.ipynb
zig zig-cache,zig-out@build.zig
rebar _build@rebar.config
dune _build@dune-project
mix _build@mix.exs
stack .stack-work@stack.yaml
godot .godot@project.godot


Copyright (c) 2022-2024 projclean-developers.

argc is made available under the terms of either the MIT License or the Apache License 2.0, at your option.

See the LICENSE-APACHE and LICENSE-MIT files for license details.


~267K SLoC