Reset: wipe and reinstall from scratch
If a VM gets into a bad state, or you want a guaranteed-clean baseline, tear the whole thing down and start over. There are three levels, from lightest to a full nuke.
1. Rebuild the VM, keep the image cache
klimax destroy deletes the VM, every cluster, and the host
route — but with the default host-backed cache it leaves
~/.klimax/registry-cache/ in place, so the rebuild pulls
from local cache instead of the internet:
$ klimax destroy # VM + clusters + host route (sudo)
$ klimax up # fresh VM, warm registry cache
This is the same destroy && up you run
after a klimax upgrade — a rebuilt VM
with the image cache intact.
2. Also drop the registry cache
To force cold pulls again — say you want to reclaim disk or test a clean network path — clear the mirror caches too:
$ klimax registry clean-cache # remove mirror containers + cache dirs
$ klimax destroy
$ klimax up
3. Full clean install — remove all state
The nuclear option. This deletes klimax's entire state directory,
including config.yaml, the Lima instance, and the registry
cache — the equivalent of a first-ever install:
$ klimax destroy # tear down VM, clusters, host route (sudo)
$ rm -rf ~/.klimax # config, Lima instance, registry cache
$ rm -rf ~/.kube/klimax # per-cluster kubeconfigs (optional)
$ klimax up # regenerates a default config + fresh VM
klimax keeps all of its state under
~/.klimax/ (it forces LIMA_HOME there, so it
never touches a system-wide ~/.lima/). Per-cluster
kubeconfigs live in ~/.kube/klimax/. Removing those two
directories after a destroy leaves nothing behind.
Deleting ~/.klimax/config.yaml is safe — the next
klimax up writes a fresh default config. Copy it aside first
if you've customized CPUs, memory, the bridge CIDR, or mirrors.
See also
- Upgrading klimax — the everyday
destroy && upyou run after a new release. - Configuration — what lives in
~/.klimax/config.yamlbefore you delete it. - Registry mirrors — what the image cache holds and how
clean-cacheworks.