Polykill

November 5, 2025 · View on GitHub

Crates.io Crates.io (Downloads) Crates.io Size

Like polyfill - but more violent

Lightweight command line utility for removing unwanted dependencies and build artifacts from local projects. Inspired by npkill.

Supported project types:

  • Node
  • Cargo
  • .NET
  • Go
  • Gradle
  • Mix
  • Composer
  • Misc. (see "Additional Information")

Installation

Cargo

cargo install polykill

Homebrew

brew tap bdeering1/polykill
brew install polykill

Nix (Flake)

nix shell github:Bdeering1/polykill
# OR
nix run github:Bdeering1/polykill

Usage

polykill [OPTIONS] [DIR]

Polykill will recursively search for projects in the provided directory and output a list of all projects found. If no directory is provided, the current directory will be searched.

When the search has completed, navigate the menu using the following controls:

Key BindAction
↓, ↑, ←, →, h, j, k, lselect project
enter, delremove artifacts
esc, qexit

Warning for Node projects: Some Node applications need their node_modules directory to work and deleting it may break them.

Options

ArgumentDescription
-v, --verboseVerbose output
-a, --autoAutomatically clean up older project artifacts (no menu)
-t, --thresholdMinimum threshold for automatic artifact cleanup (days since last modified)
      --registerRegister system service to run polykill automatically
      --unregisterRemove registered system service
-i, --intervalInterval (in days) to run system service on
      --statusCheck if a polykill service exists, print info if found
-s, --skip-emptyHide projects with zero possible disk savings
-u, --unsortedDon't sort projects
      --no-vcsInclude projects without version control (this will slow down search)
-h, --helpPrint help
-V, --versionPrint version

*supported version control systems are: git, svn, and mercurial

Additional Information

How projects are identified and which files or directories will be removed:

TypeIdentifier(s)Artifacts
Nodepackage.jsonnode_modules
Cargocargo.tomltarget
.NET.csprojbin, obj
Gogo.moddir(.exe), dir.test(.exe)
Gradlebuild.gradle(.kts)build
Mixmix.exs_build, deps
Composercomposer.jsonvendor
Misc.bin, build, distbin, build, dist

*dir for go projects is the name of the project directory