DEV Community

Cover image for Free up disk space by running these docker commands
Hossein Kazemi
Hossein Kazemi

Posted on

5 1

Free up disk space by running these docker commands

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

Top comments (1)

Collapse
 
skenekt profile image
Alexey Suharev

thank. During

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay