Joeri Verdeyen bio photo

Joeri Verdeyen

Web-engineer, cyclist, Nespresso lover, Strava pusher.

Twitter LinkedIn Instagram Github Stackoverflow Strava

Free up disk space on a Digital Ocean Droplet

I’ve been using Digital Ocean for a while now. For security reasons you should turn on automatic security updates on your Ubuntu Droplets. I believe it’s important to stay up to date with the latest security patches.

Unused Linux Kernels

This may cause a lot of disk space used by unused Linux Kernels. I’m using this command to clean them up when the disk space usage alarm fires.

sudo apt-get autoclean && \
sudo apt-get clean && \
sudo apt-get autoremove && \
sudo update-grub

You will the following output once or even more:

Removing linux-image-extra-3.13.0-51-generic (3.13.0-51.84) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.13.0-51-generic /boot/vmlinuz-3.13.0-51-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.13.0-51-generic /boot/vmlinuz-3.13.0-51-generic
update-initramfs: Generating /boot/initrd.img-3.13.0-51-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.13.0-51-generic /boot/vmlinuz-3.13.0-51-generic
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.13.0-52-generic
Found initrd image: /boot/initrd.img-3.13.0-52-generic
Found linux image: /boot/vmlinuz-3.13.0-51-generic
Found initrd image: /boot/initrd.img-3.13.0-51-generic
Found linux image: /boot/vmlinuz-3.13.0-37-generic
Found initrd image: /boot/initrd.img-3.13.0-37-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin

After that, check the disk usage with: df -h.

Thanks for reading

Feel free to leave a comment if you have remarks or like this post