Skip to content

Instantly share code, notes, and snippets.

@CypherpunkSamurai
Created April 22, 2024 09:31
Show Gist options
  • Select an option

  • Save CypherpunkSamurai/4606d580b3ea93991b10ed8c2279174c to your computer and use it in GitHub Desktop.

Select an option

Save CypherpunkSamurai/4606d580b3ea93991b10ed8c2279174c to your computer and use it in GitHub Desktop.
Backup-Restore Removing / Reinstalling Podman on Windows

Backup-Restore / Remove / Reinstall Podman on Windows

These are steps you can follow to remove podman on Windows (WSL2)

Backup Restore Podman Machine to Tar

To backup the current podman machine to tarball

wsl --export podman-machine-default podman-machine-default.tar

Remove Podman

To remove podman remove the wsl installation and rootfs

wsl --unregister podman-machine-default

Note: If you have podman machine named different find your wsl distro first. use wsl --list command to list all installed linux instances. use wsl --unregister [id] to remove it and its rootfs

Reinstall Podman

Having followed the above steps you will have removed the podman wsl machine. Now you can remove the podman index files.

rm ${Env:USERPROFILE}\.config\containers\podman\machine\wsl\podman-machine-default.json
rm ${Env:USERPROFILE}\.config\containers\podman\machine\wsl\podman-machine-default.lock

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment