Different disk space usage for 5 identical droplets of Ubuntu 16.04.3

Posted January 30, 2018 2.9k views
DigitalOceanUbuntu 16.04Storage

I have 5 droplets created at different times, older one Oct 2016 with Ubuntu 16.04.1 and newer 16.04.2.
All of them have nginx php7-fpm and Grav CMS on it, nothing else, same exact configuration of the files in www in the user folder.

I recently upgraded them all to 16.04.3 for the meltdown and spectre fixes and since I made snapshots before and after the process I realized a big difference in used space of the droplets:
3 of them are 1.8GB the newest.
2 are 4.5GB the oldest ones.
What is making this big difference?

The size of the www folder goes from 100mb of the smaller to 500mb of the bigger one since the sites are quite small, so that’s not making a the difference.

I upgraded with “dist-upgrade” and then did “apt-get clean” “apt-get autoremove” and “apt-get autoremove –purge”
to clean all unused apt and old kernels, but that did little to nothing. Actually the small droplets got smaller and the big ones got bigger after all the upgrades.

It’s not really a problem since everything’s working properly, but I would like to know more about it, just to learn a bit more about the Linus environment.

Thanks in advance for the reply.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

if you run:
sudo du -h -d 1 /
On a new vs. old machine that should tell you which of your top-level directories is taking up extra space.
Probably either /home or /var
You can then run:
sudo du -h -d 1 /var
etc. to narrow down where the space is.

  • Thanks for the tip. Turns out the var/log is taking up 2.5GB on the older droplets. How can I clear and set a limit to the size of the logs? I think it’s a bit crazy to keep all of those text files, since anyway nobody is ever going to read through all of that.

    Then I have /usr which is about 1GB on every droplet, and I believe that’s normal right? Even though the only files I need for the hosted websites are in /home ?

    Edit: it’s actually the logs inside journal.
    I found this:
    Do you think it’s safe to do?