0

My root drive (32GB) has run out of space, on ubuntu server 18.04lts. I only run docker and nothing else, and the docker data directory is on a different drive. I tried all the usual tricks to try and free data and i'm still sitting on 100%. I'm wondering if it's too many kernals, but I don't really fully understand about deleting unused ones. I have tried

$ sudo purge-old-kernels
0 upgraded, 0 newly installed, 0 to remove and 110 not upgraded.
$ sudo apt-get --purge autoremove
0 upgraded, 0 newly installed, 0 to remove and 110 not upgraded.

If I list all the kernals I get the following output: https://pastebin.com/9Xb3BU29

Do you think the kernals are taking up all the space?

Here is the output for sudo df -h: https://pastebin.com/0Ai8UG2c

(note /dev/sdi3 is the root drive that ubuntu runs on)


mike@server:/$ sudo du / -h -x --max-depth=1 2> /dev/null | sort -hr
31G     /
27G     /var
2.4G    /usr
...

sudo du /var/lib/docker -h -x --max-depth=1 2> /dev/null | sort -hr
26G     /var/lib/docker
23G     /var/lib/docker/overlay2
1.9G    /var/lib/docker/containers
1.2G    /var/lib/docker/volumes
...
muru
  • 207,228

1 Answers1

0

Run this command to find large folders that come off the root drive. sudo du / -h -x --max-depth=1 2> /dev/null | sort -hr (note the -x keeps the search limited to the one physical drive rather than going into mounted folders/other partitions)

Then I ran

sudo du /var/lib -h -x --max-depth=1 2> /dev/null | sort -hr

I found /var/lib/docker was the culprit.

Thanks for the help from the users above.