By seanweeks
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?
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!
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:
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>
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
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
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
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.