By tim719763
Here is what I have:
df -h
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 40G 38G 0 100% /
However, I cannot find what is using the space up with du -sh *
Any ideas how to find what is using up all that space?
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!
How I solved it:
Hope that helps.
I had the exact same issue. I am running a laravel app on a linux instance. The app performs a lot of DB queries and I found that the mysql binlogs were eating up the disk space - almost 1GB each.
To fix:
SSH onto the server
cd back to the root directory
run sudo du -h --max-depth=1 -x to show which directory is consuming space
cd down to var/lib/mysql
run PURGE BINARY LOGS TO 'mysql-bin.000100';
That will clear out the bin logs. If you want a longer term solution, consider only retaining a few days of logs as explained here
I found a number of log files that I think (although I’m not sure 100%) that I can delete. But how do I do this? What is the command to clear all log files in a certain directory Or what is the command to delete a single file? And what is the command to download that specific file should I want to because I’m not 100% sure I can delete it.
thanks!
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.