I have a droplet with 80GB of space, however it reports that it has used 75GB.
/dev/vda1 78G **75G** 2.8G 97% /
When I use the command du -h --max-depth=1 /
I get the following in reply:
274M /lib
11M /opt
16K /lost+found
15M /bin
76K /root
15M /sbin
4.0K /srv
0 /sys
4.0K /media
115M /boot
96K /tmp
4.0K /home
du: cannot access '/proc/18546/task/18546/fd/4': No such file or directory
du: cannot access '/proc/18546/task/18546/fdinfo/4': No such file or directory
du: cannot access '/proc/18546/fd/3': No such file or directory
du: cannot access '/proc/18546/fdinfo/3': No such file or directory
0 /proc
1.4G /usr
8.0K /snap
644K /run
4.0K /lib64
3.1G /var
4.0K /mnt
0 /dev
7.7M /etc
4.9G /
It’s only 4.9GB of space.
What could be happening?
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
Hello,
In some cases, when deleting a file in Linux, it doesn’t get actually deleted. This could happen when a process is holding the file open, preventing it from being deleted.
The solution would be to either restart the server or kill the process that is holding the file in order to release the disk space.
You could use the lsof
command to find which process is causing the problem:
lsof +L1
The above will show you a list of processes that are using a deleted (unlinked) file.
Alternatively you could use the following command:
lsof |grep deleted
Then you could kill that specific process or restart the service associated with the process.
Let me know how it goes. 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.