No space left on device

Hey All,

I recently started getting the following message on my Droplet.

sudo su - mastodon
/home/mastodon/.rbenv/libexec/rbenv-init: line 131: cannot create temp file for here-document: No space left on device

I went into my DigitalOcean admin and increased the space on the droplet from 25GB to 50GB, but the message persist. I get the same message if I try to cd to /home/mastodon/live as root so it seems to not be a user-related problem.

Thank you in advance for your help.

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.

Site Moderator
Site Moderator badge
January 9, 2023

Hello @volume4schalkdigitalocean

I’ve experienced the same issue with the Mastodon one-click app but the /tmp directory was the one that was getting filled with temporary files and causing the `no space left on device error for me.

After clearing the data the issue was sorted. Can you confirm that the /home directory is the one that runs out of disk space?


Bobby Iliev
Site Moderator
Site Moderator badge
January 9, 2023

Hi there,

A quick fix would be to upgrade your Droplet and add some more disk space.

Alternatively, you can follow the steps from the answer here on how to find the folder that is using most of the disk space and possibly clear some files that are not needed:

Let me know how it goes!



Site Moderator
Site Moderator badge
January 9, 2023

Hi @volume4schalkdigitalocean,

When you enter your Droplet and type in:

  1. df -h

what do you see? do you see a 100% full portion or not? If you see a full partition, you’ll need to find what has occupied all the space. If you have increased the space from 25 to 50 and this still persist, then maybe there is something that’s creating files and filling up your space for some reason.

Start with finding which partition is full and then go inside it and start digging to find what is causing the issue.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

card icon
Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Sign up
card icon
Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

Learn more
card icon
Become a contributor

You get paid; we donate to tech nonprofits.

Learn more
Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

Learn more ->
DigitalOcean Cloud Control Panel