DEV Community

loading...
Cover image for Free up disk space by running these docker commands

Free up disk space by running these docker commands

hossein761 profile image Hossein Kazemi ・1 min read

If you are using Docker, every now and then your disk gets filled up with dangling docker images and volumes. Simple run the following commands to get rid of them and open up disk space on your machine:

# remove dangling images
docker rmi -f $(docker images -f dangling=true -q)

# remove dangling volumes
docker volume rm $(docker volume ls -qf dangling=true)
Enter fullscreen mode Exit fullscreen mode

I am starting a newsletter focused on teaching hands-one backend and infrastructure through building micro-projects.
Follow me on Twitter for the announcement: hossein761

Discussion (1)

pic
Editor guide
Collapse
skenekt profile image
Alexey Suharev

thank. During