macOS
brew install kubetrimlocal Homebrew formula metadata
brew
Trim your KUBECONFIG automatically. Version 0.0.2 via Homebrew; verified from local package data.
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 | cli | global executable |
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.
https://github.com/alexellis/kubetrim
install metadata
| Package key | brew:kubetrim |
|---|---|
| Version | 0.0.2 |
| Package manager | Homebrew |
| Package manager page | https://formulae.brew.sh/formula/kubetrim |
| Homepage | https://github.com/alexellis/kubetrim |
| Repository | https://github.com/alexellis/kubetrim |
| Upstream docs | https://github.com/alexellis/kubetrim#readme |
| License | MIT |
| Source archive | https://github.com/alexellis/kubetrim/archive/refs/tags/v0.0.2.tar.gz |
| Build dependencies | go |
| Bottle | available (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | not defined |
| Service | none declared |
registry facts
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | kubetrim |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
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.6
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.