I was trying to renew my SSL certificate on my droplet by following this guide: https://certbot.eff.org/lets-encrypt/ubuntubionic-nginx
But for some reason I kept getting 28: No space left on device
when I run apt-get update
. I tried to solve this by trying apt-get clean
, which seemed to work for a little bit but then still had the same issue.
I tried to remove files under /tmp/ and /var/log/ and started getting this error: Couldn't create temporary file /tmp/apt.conf.vDUIgg for passing config to apt-key
when I run apt-get update
. When I tried to follow this (https://sillycodes.com/quick-tip-couldnt-create-temporary-file/) but keep getting the same error. I’m running out of ideas on how to troubleshoot this, please help :'(
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!
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.
Hello,
I would recommend starting with the following:
The output would look something like this:
In my case I am using 20G out of 25GB available for my root partition. Basically the
df
command reports the file system disk space usage.The output should look something like:
Depending on the size of your disk, the command might take a while to complete. You can then go ahead and delete any of the large files that you do not need.
du
command which estimates the file space usage:For example:
Then we can
cd
into the largest folder and run the command again:We would need to do that a few more times until we get to the folder that is using those 5GB:
Then one more time:
And again:
We’ve found the folder! We can see how many files are in the folder by running this command:
Note: if you have a database service like MySQL, make sure Not to delete any files manually from the MySQL folder. This would cause issues with your database.
If you are unable to clear any disk space I would recommend upgrading your Droplet.
Let me know if you have any questions!
Regards, Bobby Source