Remove docker images and containers that are taking disk space
-
I've been using Docker for a while... I usually the command "docker run" to run containers. Today, I had the problem of saving data to disk on a database: No space left on device According to various documentation online, the solution is to use the following command: docker stop $(docker ps -a -q) docker rm $(docker ps -a -q) However, it fails in a lot of entries... Is there a proper way to clean up containers and images?
-
Answer:
The latest version of Docker supports the following command: $ docker rmi $(docker images -q --filter "dangling=true") The command will properly remove the images... This is described at https://www.calazan.com/docker-cleanup-commands/, and some comments from http://jimhoskins.com/2013/07/27/remove-untagged-docker-images.html.
Marcello de Sales at Stack Overflow Visit the source
Related Q & A:
- Where To Buy Shipping Containers?Best solution by Yahoo! Answers
- Are there any space vehicles in which it would be possible to launch yourself into space on your own?Best solution by space.stackexchange.com
- Can I estimate the row count of a large mysql table using the disk space?Best solution by Database Administrators
- How to remove empty space above the chart?Best solution by stackoverflow.com
- Why do I keep running out of disk space?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.