# Disk space usage of /lib/docker is high

**URL:** https://meta.discourse.org/t/disk-space-usage-of-lib-docker-is-high/67375
**Category:** Self-hosting
**Tags:** server-resources
**Created:** [August 3, 2017, 12:12pm UTC](https://meta.discourse.org/t/disk-space-usage-of-lib-docker-is-high/67375 "2017-08-03T12:12:59Z")
**Posts on this page:** 1
**Showing post:** 10

<div class="post-metadata">

### Author: ![blau](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/blau/32/34145_2.png) [@blau](https://meta.discourse.org/u/blau)
#### Post date: [May 10, 2018, 12:48pm UTC](https://meta.discourse.org/t/disk-space-usage-of-lib-docker-is-high/67375/10 "2018-05-10T12:48:29Z")

</div>

I was low on disk space and could not upgrade discourse nor free up space. Turns out `/var/lib/docker/aufs/diff` was the culprit. This is what worked for me:

- upgrade system software, autoremove, autoclean and reboot to new kernel;
- reinstall docker via [get.docker.io](http://get.docker.io)
- `/var/discourse/launcher cleanup` (recover 4GB space)
- `docker system prune` (recover 1.4 GB)

I was on an old 17.x docker version and after several `./launcher rebuild app` I had less than 5GB free on a 20 GB disk. Same issue as discussed here (thread closed):

> [@Docker disk usage issue c. Sept 1 2017](https://meta.discourse.org/t/docker-disk-usage-issue-c-sept-1-2017/69194/8):
>
> I just did some tests and found that to get an accurate count of disk usage for /var/lib/docker, you need to pass the -x option to du so it doesn’t count files in mounted overlay file systems. Stopping docker, which unmounts the overlay filesystems will also work but of course is less convenient then just using the -x option for du. At least this is the case when using the overlay2 docker backend, I would assume it’s the same for most of the docker backends. Edit: Strangely the sizes reported…

---

_[View the full topic](https://meta.discourse.org/t/disk-space-usage-of-lib-docker-is-high/67375)._
