Remove containers
high risk
docker ps -aReview containers firstdocker stop <c> && docker rm <c>Stop gracefully, then removeRemoves stopped containers; -f kills running ones.
| Flag | Meaning |
|---|---|
-f | Force remove a running container⚠ Kills it immediately. |
-v | Also remove anonymous volumes⚠ Deletes data. |
docker rm webRemove a stopped container · explain & risk-check →docker container pruneRemove all stopped containers · explain & risk-check →Reference text is hand-written and may be incomplete — check man docker for your version. Test destructive commands on a non-production system first.