A thorough guide to completely removing Podman from your system, including containers, images, volumes, configuration files, and all associated data.
- Prerequisites
- Step 1: Stop All Running Containers
- Step 2: Remove All Images, Volumes, and Networks
- Step 3: Stop and Disable Podman Services
- Step 4: Remove Generated systemd Unit Files
- Step 5: Uninstall the Podman Package
- Step 6: Remove Remaining Data and Configuration
- Step 7: Clean Up subuid and subgid Entries
- Step 8: Remove Shell Aliases and Environment Variables
- Step 9: Verify Complete Removal
- Complete Uninstallation Script
- Troubleshooting
- Summary
A complete Podman uninstallation requires removing not just the package but also all containers, images, volumes, and configuration files left behind.
Whether you are switching to a different container runtime or cleaning up a test environment, simply uninstalling the Podman package leaves behind significant data. This guide walks through a complete removal on every major platform.
- A system with Podman installed
- A user account with sudo privileges
Before uninstalling, stop and remove all containers:
# Stop all running containers (rootless)
podman stop --all
# Stop all running containers (rootful, if any)
sudo podman stop --all
# Remove all containers (rootless)
podman rm --all --force
# Remove all containers (rootful)
sudo podman rm --all --force# Remove all images (rootless)
podman rmi --all --force
# Remove all volumes (rootless)
podman volume rm --all --force
# Remove all networks except the default (rootless)
podman network prune --force
# Repeat for rootful
sudo podman rmi --all --force
sudo podman volume rm --all --force
sudo podman network prune --forceOr use the nuclear option:
# Reset everything in one command (rootless)
podman system reset --force
# Reset everything (rootful)
sudo podman system reset --force# Disable the user-level Podman socket
systemctl --user stop podman.socket
systemctl --user disable podman.socket
# Disable the user-level Podman service
systemctl --user stop podman.service 2>/dev/null
systemctl --user disable podman.service 2>/dev/null
# Disable system-level services if enabled
sudo systemctl stop podman.socket 2>/dev/null
sudo systemctl disable podman.socket 2>/dev/null
sudo systemctl stop podman.service 2>/dev/null
sudo systemctl disable podman.service 2>/dev/null# Remove user-generated container and pod services
rm -f ~/.config/systemd/user/container-*.service
rm -f ~/.config/systemd/user/pod-*.service
# Remove system-level generated container and pod services
sudo rm -f /etc/systemd/system/container-*.service
sudo rm -f /etc/systemd/system/pod-*.service
# Reload systemd
systemctl --user daemon-reload
sudo systemctl daemon-reload# Remove Podman and related packages
sudo dnf remove -y podman podman-docker podman-compose buildah skopeo
# Remove orphaned dependencies
sudo dnf autoremove -y# Remove Podman and related packages
sudo apt remove -y podman podman-docker buildah skopeo
# Remove configuration files too
sudo apt purge -y podman podman-docker buildah skopeo
# Clean up orphaned dependencies
sudo apt autoremove -y# Remove Podman and related packages
sudo dnf remove -y podman podman-docker buildah skopeo
# Remove orphaned dependencies
sudo dnf autoremove -y# Remove Podman and related packages
sudo pacman -Rns podman buildah skopeo
# Remove any IgnorePkg entries
sudo sed -i '/^IgnorePkg.*podman/d' /etc/pacman.conf# Remove Podman and related packages
sudo zypper remove -y podman podman-docker buildah skopeo
# Remove any package locks
sudo zypper removelock podman 2>/dev/null# Remove Podman
sudo apk del podman# Stop and remove the Podman machine
podman machine stop
podman machine rm --force
# Uninstall via Homebrew
brew uninstall podman
brew uninstall podman-compose 2>/dev/null
# Remove the Podman formula cache
brew cleanup podman# Stop and remove the machine
podman machine stop
podman machine rm --force
# Uninstall via winget
winget uninstall --id RedHat.Podman --exact# Remove rootless container storage
rm -rf ~/.local/share/containers
rm -rf ~/.config/containers
# Remove rootful container storage
sudo rm -rf /var/lib/containers
# Remove Podman runtime data
rm -rf $XDG_RUNTIME_DIR/podman
rm -rf $XDG_RUNTIME_DIR/containers
rm -rf /tmp/podman-run-$(id -u)
# Remove system-level configuration
sudo rm -rf /etc/containers
sudo rm -rf /etc/cni/net.d
# Remove Podman cache
rm -rf ~/.cache/containers# Remove your user's entries from subuid and subgid (optional)
sudo sed -i "/^$(whoami):/d" /etc/subuid
sudo sed -i "/^$(whoami):/d" /etc/subgid# Remove any Docker compatibility aliases
sed -i '/alias docker=podman/d' ~/.bashrc ~/.zshrc 2>/dev/null
sed -i '/DOCKER_HOST.*podman/d' ~/.bashrc ~/.zshrc 2>/dev/null
# Reload the shell configuration
source ~/.bashrc 2>/dev/null || source ~/.zshrc 2>/dev/null# Confirm Podman is no longer installed
which podman 2>/dev/null && echo "Podman still found!" || echo "Podman removed successfully"
# Check for remaining files
ls ~/.local/share/containers 2>/dev/null && echo "Leftover data found" || echo "No leftover data"
ls ~/.config/containers 2>/dev/null && echo "Leftover config found" || echo "No leftover config"
ls /var/lib/containers 2>/dev/null && echo "Leftover system data found" || echo "No leftover system data"
# Check for remaining services
systemctl --user list-units | grep podman
sudo systemctl list-units | grep podmanHere is a comprehensive script for Fedora-based systems:
#!/bin/bash
# uninstall-podman.sh - Complete Podman removal
echo "Stopping all containers..."
podman stop --all 2>/dev/null
sudo podman stop --all 2>/dev/null
echo "Resetting Podman..."
podman system reset --force 2>/dev/null
sudo podman system reset --force 2>/dev/null
echo "Disabling services..."
systemctl --user stop podman.socket 2>/dev/null
systemctl --user disable podman.socket 2>/dev/null
systemctl --user stop podman.service 2>/dev/null
systemctl --user disable podman.service 2>/dev/null
sudo systemctl stop podman.socket 2>/dev/null
sudo systemctl disable podman.socket 2>/dev/null
sudo systemctl stop podman.service 2>/dev/null
sudo systemctl disable podman.service 2>/dev/null
echo "Removing packages..."
sudo dnf remove -y podman podman-docker buildah skopeo 2>/dev/null
sudo dnf autoremove -y
echo "Cleaning up data..."
rm -rf ~/.local/share/containers
rm -rf ~/.config/containers
rm -rf ~/.cache/containers
sudo rm -rf /var/lib/containers
sudo rm -rf /etc/containers
echo "Cleaning up shell configuration..."
sed -i '/alias docker=podman/d' ~/.bashrc 2>/dev/null
sed -i '/DOCKER_HOST.*podman/d' ~/.bashrc 2>/dev/null
echo "Podman has been completely removed."If podman system reset fails:
# Manually remove the storage directories
rm -rf ~/.local/share/containers
sudo rm -rf /var/lib/containersIf package removal fails due to dependencies:
# Force remove on Fedora
sudo rpm -e --nodeps podman
# Force remove on Debian
sudo dpkg --remove --force-depends podmanCompletely uninstalling Podman requires more than just removing the package. You need to stop all containers, reset storage, disable services, remove configuration files, and clean up shell aliases. The verification steps at the end ensure nothing is left behind. Save the uninstallation script for quick cleanup of test environments.
Share this article
Author
@nawazdhandala • Mar 16, 2026 • 5 min read
Nawaz is building OneUptime with a passion for engineering reliable systems and improving observability.