3 ms·
Like this? docker rmi -af I'm a bit confused by the backticks as I use them all the time scripting, but also in Markdown.
by willemmali 10y ago
Like this?
docker rmi -af
I'm a bit confused by the backticks as I use them all the time scripting, but also in Markdown.
- realPubkey 10y agoI have a gist for it: https://gist.github.com/pubkey/73dcb894cf5f7d262863 https://gist.github.com/pubkey/73dcb894cf5f7d262863 #stop and delete all containers docker rm -f $(docker ps -a -q) #delete all images docker rmi -f $(docker images -q)
- assaflavie 10y agofwiw, there's a new syntax for this, that is a bit more verbose, but probably worth adopting: docker container rm $(docker container ls -qa) docker image rm $(docker image ls -q)
- e40 10y agoThis is NOT equivalent. The OP was talking about removing unused images. Your commands remove all images.
- lloeki 10y agoMaybe this? docker rm $(docker ps -qa --no-trunc --filter "status=exited") docker rmi $(docker images --filter "dangling=true" -q --no-trunc)