Automic VaultAutomic Vault

brew

Install kubetrim with Homebrew, Nix, zypper

Trim your KUBECONFIG automatically. Version 0.0.2 via Homebrew; verified from local package data.

install

Additional install commands

macOS

Homebrewverified · 100%
brew install kubetrim

local Homebrew formula metadata

Linux

Nixverified · 92%
nix profile install nixpkgs#kubetrim

nixpkgs package indexes · pkgs/by-name/ku/kubetrim/package.nix · source: api.github.com

openSUSE zypperverified · 92%
sudo zypper install kubetrim

openSUSE Tumbleweed package metadata · kubetrim · source: download.opensuse.org

overview

Package summary

Trim your KUBECONFIG automatically

Commands and aliases

  • kubetrim

history

Project history and usage

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.

Project history

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.

Adoption history

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.

How it is used

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.

Why package nerds care

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.

Timeline

  • 2024: The repository copyright and release series show the tool as an Alex Ellis Go CLI.
  • 2024: v0.0.1 added the keep-file mechanism for unreachable clusters that should not be deleted.
  • 2024: v0.0.2 added a timeout when checking cluster contexts.

Related projects

  • Related tools include kubectl config, kubectx, arkade, k3sup, and other small Kubernetes operator utilities. kubetrim complements kubectx by cleaning both context and cluster entries after connectivity checks.

security posture

Risk level: green

narrow executable package without higher-risk signals.

Risk classifier

green risk · low confidence · appliance

Why

  • narrow executable package without higher-risk signals

Signals

  • metadata:no-higher-risk-signals

Install behavior

  • No Homebrew post-install hook is recorded in formula metadata.
  • Homebrew bottle metadata is available for 6 platform targets.
  • Build metadata lists 1 build dependencies.

Recommended review

Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.

executables

Installed executables

CommandKindExposureNote
kubetrimcliglobal executable

freshness

Version and 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.

page generated2026-07-08
manager version0.0.2
manager updated
local dataok
upstreamcurrent
latest detectedv0.0.2

https://github.com/alexellis/kubetrim

  • infoNo package-manager update timestamp was available.low confidence

install metadata

Package metadata

Package keybrew:kubetrim
Version0.0.2
Package managerHomebrew
Package manager pagehttps://formulae.brew.sh/formula/kubetrim
Homepagehttps://github.com/alexellis/kubetrim
Repositoryhttps://github.com/alexellis/kubetrim
Upstream docshttps://github.com/alexellis/kubetrim#readme
LicenseMIT
Source archivehttps://github.com/alexellis/kubetrim/archive/refs/tags/v0.0.2.tar.gz
Build dependenciesgo
Bottleavailable (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux)
Homebrew post-installnot defined
Servicenone declared

registry facts

Source database details

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Namekubetrim
Version Scheme0
Revision0
Head VersionHEAD
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • head
  • stable

source database matches

Other package-manager records

Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.

Nix95%

kubetrim

nix profile install nixpkgs#kubetrim
  • normalized package name match
  • Matched by: Kubetrim
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/ku/kubetrim/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
zypper95%

kubetrim 0.0.1-1.6

Trim your KUBECONFIG automatically

https://github.com/alexellis/kubetrim

sudo zypper install kubetrim
  • License: MIT
  • Category: Unspecified
  • Architecture: x86_64
  • Source Package: kubetrim
  • 1 dependencies
  • 1 provides
  • normalized package name match
  • Matched by: Kubetrim
openSUSE Tumbleweed package metadata · download.opensuse.org · openSUSE Tumbleweed package metadata: kubetrim from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

source trail

Generated from repository data

This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.

Used sources

  • Geiger risk classifier
  • Nucleus package database
  • av.db category and tag curation
  • cross-ecosystem install command graph
  • curated package history
  • external package-manager database matches
  • package relationship graph
  • package version freshness
  • package-page enrichment