macOS
brew install kubetrimlocal Homebrew formula metadata
brew / rank 9493
Trim your KUBECONFIG automatically. Version 0.0.2 via Homebrew; verified 2026-07-27. Also installable with nix: nix profile install nixpkgs#kubetrim.
install
brew install kubetrimlocal Homebrew formula metadata
nix profile install nixpkgs#kubetrimnixpkgs package indexes · pkgs/by-name/ku/kubetrim/package.nix · source: api.github.com
sudo zypper install kubetrimopenSUSE Tumbleweed package metadata · kubetrim · source: download.opensuse.org
overview
Trim your KUBECONFIG automatically
history
kubetrim is a small Alex Ellis utility for pruning stale Kubernetes contexts and clusters from a kubeconfig. It is a deliberately narrow CLI: load a kubeconfig, test contexts, and write back the entries that still work.
The project appeared as a compact Go repository with a README centered on one job: tidying old and broken cluster and context entries. Its own Q&A compares the tool to doing the work manually with kubectl config commands and notes that kubectx removes contexts but leaves additional cleanup steps.
kubetrim is niche but package-manager friendly: the batch input records Homebrew, Nix, and zypper packaging, and the README documents arkade and release downloads. That footprint is typical for Alex Ellis utilities that solve a recurring operator annoyance with a small binary.
Users run kubetrim against the kubeconfig selected by KUBECONFIG, optionally use --write=false for a dry run, and can keep unreachable contexts by listing them in ~/.local/kubetrim/keep.txt. The README also suggests cron or shell startup usage for people who accumulate short-lived clusters.
kubetrim matters less as a broad Kubernetes platform and more as a tiny example of packageable operational hygiene. It wraps a manual, error-prone kubectl config cleanup routine into a single command with conservative behavior when every cluster appears unreachable.
security posture
narrow executable package without higher-risk signals.
green risk · low confidence · appliance
Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.
executables
| Command | Kind | Exposure | Note |
|---|---|---|---|
kubetrim | executable | indexed executable | Discovered from the local executable index. |
freshness
These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.
install metadata
| Package key | brew:kubetrim |
|---|---|
| Version | 0.0.2 |
| Package manager | Homebrew |
| Homepage | https://github.com/alexellis/kubetrim |
| Repository | https://github.com/alexellis/kubetrim |
| Last updated | 2026-07-27T21:58:47+02:00 |
| Pulse | updated |
| Bottle | not recorded |
| Service | none declared |
source database matches
Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.
kubetrim
nix profile install nixpkgs#kubetrimkubetrim 0.0.1-1.9
Trim your KUBECONFIG automatically
https://github.com/alexellis/kubetrim
sudo zypper install kubetrimsource trail
This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.
View the package source record on GitHub.