Add profiles system#223
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is one of the biggest changes in npkill.
The profile system allows you to group multiple targets under one umbrella.
Now
node_modulesis included in the “node” profile, along with other targets.A base has been created, but users will be allowed to define their own.
You can check the available profiles with
--profiles.The usage is
npkill --profiles <profile separated by ,>. E.g.:npkill --profiles node,android,data-analysisAvailable profiles
node (default) - All the usual suspects related with the node/web/javascript dev toolchain: node_modules, caches, build artifacts, and assorted JavaScript junk. Safe to clean and your disk will thank you.
node_modules,.npm,.pnpm-store,.yarn/cache,.next,.nuxt,.angular,.svelte-kit,.vite,.nx,.turbo,.parcel-cache,.rpt2_cache,.eslintcache,.esbuild,.cache,.rollup.cache,storybook-static,coverage,.nyc_output,.jest,gatsby_cache,.docusaurus,.swc,.stylelintcache,deno_cache
python - The usual Python leftovers — caches, virtual environments, and test artifacts. Safe to clear once you’ve closed your IDE and virtualenvs.
pycache,.pytest_cache,.mypy_cache,.ruff_cache,.tox,.nox,.pytype,.pyre,htmlcov,.venv,venv
data-science - Jupyter checkpoints, virtualenvs, MLflow runs, and experiment outputs. Great for learning, terrible for disk space.
.ipynb_checkpoints,pycache,.venv,venv,outputs,.dvc,.mlruns
java - Build outputs and Gradle junk.
target,.gradle,out
android - Native build caches and intermediate files from Android Studio. Deleting won't hurt, but expect a rebuild marathon next time.
.cxx,externalNativeBuild
swift - Xcode's playground leftovers and Swift package builds. Heavy, harmless, and happy to go.
DerivedData,.swiftpm
dotnet - Compilation artifacts and Visual Studio cache folders. Disposable once you're done building or testing.
obj,TestResults,.vs
rust - Cargo build targets. Huge, regenerable, and surprisingly clingy, your disk will appreciate the reset.
target
ruby - Bundler caches and dependency leftovers.
.bundle
elixir - Mix build folders, dependencies, and coverage reports. Easy to regenerate, safe to purge.
_build,deps,cover
haskell - GHC and Stack build outputs. A collection of intermediate binaries you definitely don't need anymore.
dist-newstyle,.stack-work
scala - Bloop, Metals, and build outputs from Scala projects.
.bloop,.metals,target
cpp - CMake build directories and temporary artifacts. Rebuilds take time, but space is priceless.
CMakeFiles,cmake-build-debug,cmake-build-release
unity - Unity's cache and build artifacts. Expect longer load times next launch but it can save tons of space on unused projects.
Library,Temp,Obj
unreal - Intermediate and binary build caches. Safe to clean. Unreal will (happily?) recompile.
Intermediate,DerivedDataCache,Binaries
godot - Editor caches and import data. Godot can recreate these in a blink.
.import,.godot
infra - Leftovers from deployment tools like Serverless, Vercel, Netlify, and Terraform.
.serverless,.vercel,.netlify,.terraform,.sass-cache,.cpcache,elm_stuff,nimcache,deno_cache