Question

How can I tell how much disk space is available on my Droplet?

I’ve logged into the server (“droplet”) using Putty and the root username and password. Now I would like to know how much disk space is remaining that is available to me. How can I find this out?

Show comments

Submit an answer


This textbox defaults to using Markdown to format your answer.

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

Sign In or Sign Up to Answer

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.

Bobby Iliev
Site Moderator
Site Moderator badge
December 26, 2023
Accepted Answer

Hey DigitalOcean Community,

I hope you’re all doing well! I came across this question and I wanted to share a quick guide on how you can easily check the available disk space on your DigitalOcean Droplet. Let’s dive in!

Step 1: Log into Your Droplet

First things first, grab your favorite SSH client. Connect to your Droplet using the root username and the IP address of your Droplet:

https://docs.digitalocean.com/products/droplets/how-to/connect-with-ssh/

Step 2: The Magical df Command

Once you’re in, your best friend is the df command. This command shows you the amount of disk space that is free on your server’s file systems. Just type df and hit Enter. Want to make things more readable? Go for df -h to get the output in a human-friendly format, displaying sizes in GBs, MBs, etc.

Understanding the Output

Here’s a quick rundown of what you’re looking at:

  • Filesystem: This is where you’ll see the name of the file system or partition.
  • Size: Total size - pretty straightforward.
  • Used: How much space has already been used.
  • Available: The real MVP - this tells you how much space you’ve got left.
  • Use%: A handy percentage showing how much of the file system is used.
  • Mounted on: Shows where the file system is mounted in your directory structure.

Bonus Tip: Checking Specific Directories

Sometimes, you might want to check how much space a specific directory or file is using. For this, turn to the du command. For example, du -sh /var/log gives you the size of the /var/log directory in an easy-to-read format.

Don’t Forget About Inodes

If you suspect inode exhaustion (a less common, but tricky issue), df -i is your go-to command to check inode usage.

And that’s pretty much it! Regularly monitoring your disk space is key to avoiding any nasty surprises. I hope this guide helps you keep your Droplet in top shape. As always, if you have any questions or need a bit of extra help, feel free to drop a comment below - I’m here to help!

Happy coding,

Bobby

df -h will report disk space, it doesn’t show RAM usage. The line you want for how much disk space you’re using is likely /dev/vda. For instant on mine I see: <br> <br>/dev/vda 20G 2.0G 17G 11% / <br> <br>The second column shows total space, third column how much you’re using, fourth amount free and fifth percent used. <br> <br>To see how much RAM you’re using run: <br> <br>free -m <br>

Bobby Iliev
Site Moderator
Site Moderator badge
July 13, 2021

Hello,

In addition to what has already been mentioned about using the df -h command, here is are some step by step instructions on how to find out what files and folders are consuming most of the disk space on your server:

https://www.digitalocean.com/community/questions/28-no-space-left-on-device-error

Regards, Bobby

Become a contributor for community

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

DigitalOcean Documentation

Full documentation for every DigitalOcean product.

Resources for startups and SMBs

The Wave has everything you need to know about building a business, from raising funding to marketing your product.

Get our newsletter

Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.

New accounts only. By submitting your email you agree to our Privacy Policy

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.