Almost out of disk space randomly?

April 29, 2015 5.6k views
Miscellaneous Deployment

Preface: I only use my droplet for small web projects and a TeamSpeak server.

I just recently decided to check my droplet’s free space and noticed it’s only 2.2GB out of 20GB. I simply don’t see how this is possible. Do the automated backups take up space on my droplet?

  • You can run du to get a report on disk usage. If you set the -max-depth to 1 and run from the root folder, then it will tell you what directory is using the most space.

     $ cd /
     $ du -h -max-depth=1

    For example, on my system the /var folder is the largest. So you can then repeat the process to find an oversized folder.

     $ cd /var
     $ du -h -max-depth=1

    As for backups, I really hope they are not stored on the droplet. That kind of defeats the purpose of backups.

  • I guess -max-depth isn’t a possible argument on Ubuntu 14.04?

  • @Sinclair sorry, it should be --max-depth=1 with 2 dashes.

  • May not be relevant, but I also found my Digital Ocean droplet disk space filling up. It turned out to be old versions of the linux kernels - I used sudo apt-get autoremove to free up space. You can read my blog post on the subject free disk space on digital ocean droplets by removing unused ubuntu versions

1 Answer

Turns out I had forgot about some old swap images I had made, haha.

Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!