podman-stop(1)
π podman-stop(1) β stop one or more running containers
Okay bestie, this is the podman-stop(1) page from the General Commands Manual β yes, that's the manual name, I'm folding it in up top like a lil name tag π β and honestly? It's giving "shut it down, respectfully." Let's go. β¨
πΈ NAME πΈ
podman-stop β stop one or more running containers. That's it. That's the whole job. Iconic. π
β¨ SYNOPSIS β¨
podman stop [options] container ...
podman container stop [options] container ...
Both forms slay equally β pick whichever vibe you want. π«Ά
π¦ DESCRIPTION π¦
So basically: this stops one or more containers, and you feed it container IDs or names as input. Easy.
The --time option is the β¨patience settingβ¨ β it's the number of seconds to wait before forcibly stopping the container after the stop command is issued to the container. Default is 10 seconds. Clock's ticking, babe. β³
By default, containers get stopped with SIGTERM and then SIGKILL after the timeout β so it's a polite ask first, then the not-so-polite ask. π
Fun fact: that SIGTERM default can be overridden by the image used to create the container, and also via command line when creating the container. So it's not always necessarily SIGTERM, iykyk. π₯
π OPTIONS π
--all,-aβ Stop all running containers. Lowkey important: this does not include paused containers. π- *
--cidfile=file* β Read the container ID from the specified file and stop the container. Can be specified multiple times. π« Command does not fail when the file is missing and the user specified--ignore. --filter,-f=filter β Filter what containers stop. Multiple filters can be given with multiple uses of the--filterflag. Filters with the same key work inclusive, with the only exception beinglabel, which is exclusive. Filters with different keys always work exclusive. No cap. π§
Valid filters are listed below:
idβ[ID]Container's ID (CID prefix match by default; accepts regex)nameβ[Name]Container's name (accepts regex)annotationβ[Key]or[Key=Value]Annotation assigned to a containerannotation!β[Key]or[Key=Value]Annotation NOT assigned to a containerlabelβ[Key]or[Key=Value]Label assigned to a containerlabel!β[Key]or[Key=Value]Label NOT assigned to a containerexitedβ[Int]Container's exit codestatusβ[Status]Container's status:'created','initialized','running','stopped','paused','exited','removing','stopping','unknown'ancestorβ[ImageName]Image or descendant used to create container (accepts regex)beforeβ[ID]or[Name]Containers created before this containersinceβ[ID]or[Name]Containers created since this containervolumeβ[VolumeName]or[MountpointDestination]Volume mounted in containerhealthβ[Status]healthy or unhealthypodβ[Pod]name or full or partial ID of podnetworkβ[Network]name or full ID of networkrestart-policyβ[Policy]Container's restart policy (e.g.,'no','on-failure','always','unless-stopped')untilβ[DateTime]Containers created before the given duration or time.commandβ[Command]the command the container is executing, onlyargv[0]is takenshould-start-on-bootβ[Bool]Containers that need to be restarted after system reboot. True for containers with restart policy'always', or'unless-stopped'that were not explicitly stopped by the user
--ignore,-iβ Ignore errors when specified containers are not in the container store. Picture this: a user decided to manually remove a container, which leads to a failure during theExecStopdirective of a systemd service referencing that container. This flag is literally the "it's fine, we move" button. π«Ά--latest,-lβ Instead of providing the container name or ID, use the last created container. β οΈ Note: the last started container can be from other users of Podman on the host machine, so likeβ¦ mind the vibe check there. (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines)--time,-t=seconds β Seconds to wait before forcibly stopping the container. Use-1for infinite wait β yes, infinite. Patience of a saint, bestie. π°οΈ
Heads up: --latest is genuinely unavailable on the remote Podman client, including Mac and Windows (excluding WSL2) machines. Not me gatekeeping, that's just the manpage. π
π EXAMPLES π
Stop the specified container via its name.
$ podman stop mywebserver
Stop the container via its id.
$ podman stop 860a4b235279
Stop multiple containers.
$ podman stop mywebserver 860a4b235279
Stop the container identified in the cidfile.
$ podman stop --cidfile /home/user/cidfile-1
Stop the containers identified in the cidfiles.
$ podman stop --cidfile /home/user/cidfile-1 --cidfile ./cidfile-2
Stop the specified container in 2 seconds.
$ podman stop --time 2 860a4b235279
Stop all running containers.
$ podman stop -a
Stop the last created container (This option is not available with the remote Podman client, including Mac and Windows (excluding WSL2) machines)
$ podman stop --latest
Stop by label.
$ podman stop --filter label=app=frontend
9351ccb3ef4272532bc0c188bd4f0ddfc2b0de217732cd108259ea126b014647
Stop by name.
$ podman stop --filter name=db-replica
6c2680da61d54690718ac3aecdb04a8aad95ae353e42cc942736823bd05c8a1d
Stop by role label.
$ podman stop --filter label=role=primary
bb3ff91d969a8dc622d627e4a8d76c18bdbd417d317c5e7e66543c0b0c8ed1e8
π SEE ALSO π
podman(1), podman-rm(1) β go read those too, bestie, they're literally right there. π
π HISTORY π
September 2018, Originally compiled by Brent Baude bbaude@redhat.com β¨mailto:bbaude@redhat.comβ© β shoutout to the original author, we love a legend. π
And that's the whole page, bestie β go forth and stop things gently (or with -1 and infinite patience, your call). Signing off from podman-stop(1) in the General Commands Manual, same source, same 2018-era energy, mwah πβ¨
π¦ where this page comes from
- arch rolling: podman 6.1.4-1 Β· Apache-2.0
- centos-stream 10: podman 7:6.1.0-2.el10 Β· Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0
- nixpkgs unstable: podman 6.1.4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms