# kubetrim mit Homebrew, Nix, zypper installieren

Prüfe Installationswege, Executables, Metadaten und Sicherheitshinweise für kubetrim in AI-Agent-Workflows.

## Installation

```sh
sudo av install brew:kubetrim
```

Weitere Installationsbefehle:

### macOS

- Homebrew (100%):

```sh
brew install kubetrim
```

  Evidenz: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#kubetrim
```

  Evidenz: nixpkgs package indexes: pkgs/by-name/ku/kubetrim/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- zypper (92%):

```sh
sudo zypper install kubetrim
```

  Evidenz: openSUSE Tumbleweed package metadata: kubetrim from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

## Paketfakten

- **Paketschlüssel:** brew:kubetrim
- **Paketmanager:** Homebrew
- **Version:** 0.0.2
- **Quellzusammenfassung:** Trim your KUBECONFIG automatically
- **Homepage:** <https://github.com/alexellis/kubetrim>
- **Repository:** <https://github.com/alexellis/kubetrim>
- **Zuletzt aktualisiert:** 2026-07-27T21:58:47+02:00
- **Generiert:** 2026-08-03T19:37:03+00:00

## Executables

- kubetrim (Alias)

## Installationsverhalten

- Bottle: nicht verfügbar

## Version und Aktualität

- Seite generiert: 2026-08-03
- Manager-Version: 0.0.2
## Projektgeschichte und Nutzung

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.

### Projektgeschichte

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.

### Adoptionsgeschichte

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.

### Wie es verwendet wird

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.

### Warum Paket-Nerds sich dafür interessieren

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.

### Zeitleiste

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

### Quellen

- <https://formulae.brew.sh/formula/kubetrim>
- <https://github.com/alexellis/kubetrim>
- <https://github.com/alexellis/kubetrim/releases>


## Sicherheitshinweise

narrow executable package without higher-risk signals.

- **Geiger-Risiko:** grün / niedrig
- narrow executable package without higher-risk signals

## Andere Paketmanager-Einträge

- Nix - kubetrim: normalized package name match | nixpkgs package indexes: pkgs/by-name/ku/kubetrim/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- zypper - kubetrim - 0.0.1-1.9: normalized package name match | openSUSE Tumbleweed package metadata: kubetrim from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Trim your KUBECONFIG automatically | https://github.com/alexellis/kubetrim


## Combined YAML source

View the package source record on GitHub. [combined/kubetrim.yml](https://github.com/mxcl/pkgdb/blob/main/combined/kubetrim.yml)


## Quellen

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
