Upgrading Podman can impact running containers, depending on how the upgrade is performed and the underlying system configuration. Podman is designed as a daemonless container engine, which means each container runs as a separate process, managed directly by the user or system. When upgrading Podman, it’s important to understand what actions can cause containers to stop, and how to minimize downtime during the process.

Performing a Safe Podman Upgrade Without Interrupting Containers

Step 1: Check the Podman Version and Running Containers

Before starting any upgrade, verify your current Podman version and list all running containers. This helps you track which containers might be affected and lets you confirm everything is restored afterward.


podman --version
podman ps
    

Step 2: Review the Upgrade Documentation

Consult the official Podman release notes and your Linux distribution’s package documentation. Some upgrades, especially those involving major version changes, may require stopping containers or may affect compatibility. Look for any specific instructions or warnings related to upgrades.

Step 3: Use Package Manager for Upgrade

On most Linux distributions, upgrading Podman through the package manager does not automatically stop running containers, since Podman does not rely on a central daemon process. Use the appropriate command for your system:

  • For Fedora, CentOS, or RHEL: sudo dnf upgrade podman.
  • For Ubuntu or Debian: sudo apt-get upgrade podman.

These commands will update the Podman binary. Because running containers are managed as independent processes, they typically continue running. However, any new Podman commands you execute after the upgrade will use the new version.

Step 4: Confirm Container Status Post-Upgrade

After the upgrade completes, check the status of your containers again to ensure they are still running as expected.


podman ps
    

Step 5: Restart Podman Containers If Required

In rare cases, particularly with major version upgrades or changes to container storage backends, containers may need to be restarted or migrated. If you notice any issues, stop and start the affected containers:


podman stop <container_id>
podman start <container_id>
    

Alternative Method: Stopping Containers Before Upgrade

Some administrators prefer to stop all running containers before upgrading Podman, especially in production environments. This approach guarantees that no processes are using outdated binaries or libraries during the upgrade.

Step 1: Stop All Running Containers


podman stop $(podman ps -q)
    

Step 2: Upgrade Podman Using Your Package Manager

Follow the same package manager instructions as above to upgrade Podman.

Step 3: Start Containers Again After Upgrade

Once the upgrade is complete, restart your containers:


podman start $(podman ps -a -q)
    

This method ensures that all containers are running under the newly upgraded Podman version, which may be required for certain updates or features.


Considerations and Maintenance Tips

While Podman’s architecture usually allows containers to keep running during upgrades, always check release notes for breaking changes. Back up your container data and configurations before major upgrades. For systems using podman system service (the API socket), restarting the service after upgrade may be required. Monitor your containers after any upgrade to confirm continued operation and address any compatibility issues promptly.


Upgrading Podman is generally safe for running containers, but it’s good practice to review documentation and have a rollback plan. Careful upgrades help you avoid unnecessary downtime and keep your containerized services running smoothly.