

However, if you’d like to do a more global cleanup including Docker containers, networks, volumes, and cache, use this command: docker system prune -volumes You can remove the Docker image by running the following command: docker rmi -f IMAGE_IDįrom my experience, images usually take most of the disk space. On my computer, I’ve had various versions of the postgres image, each taking a considerable amount of space. Postgres 12.2-alpine ae192c4d3ada 8 months ago 152MB Postgres 11.8-alpine a7f73db0b977 6 months ago 156MB Pihole/pihole latest 4642d275ab73 4 months ago 296MB Now run docker images to see which images are taking up most of the disk space: docker images You can check how much of your disk space Docker has acquired so far by running: docker system df Reduce Docker disk space usageĭocker has a bad reputation for devouring large amounts of disk space. Disk Inventory X is invaluable in identifying and fixing such cases. I can imagine other stacks similarly silently consuming the disk space. Apparently, many applications are keen to cache data while neglecting to do the cleanup afterward. I’ve noticed hundreds of MBs related to Yarn that I did not use for a year or so.

On my computer the significant bulk of unnecessary data was in the ~/Library/Caches folder. Let’s now discuss the lowest hanging fruits in reducing storage usage. The program offers straightforward UI allowing you to at a glance examine your storage usage: On macOS, the simplest way to install it is to use the Homebrew Cask.

The best way to identify where the bulk of your storage space is allocated is to use Disk Inventory X application. As a result, I’ve managed to free tens of GBs of storage and could finally update XCode to the newest version. I’ve recently performed the same analysis and cleanup on my MacBook Pro. In this blog post, I’ll describe various ways to quickly and safely clean vast amounts of storage on a Mac Book used for web development. Installing or updating an app ( ahem, ahem XCode…) on macOS is sometimes surprisingly difficult because of missing disk space. Become a sponsor and reach over 20k monthly unique visitors.
