'disk space is full by `vda` files, how to clear them?

So I have a VPS and it has whm / cpanel installed. For some reason its giving an error when ever I login to cpanel or visit a site on my server which says the disk space is full.

When i check the desk space in WHM it says /dev/vda3 is 100% full.

I don't know how to track that folder or what files i need to delete.

Also on SSH it says

root@server [~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda3        48G   47G     0 100% /
tmpfs           939M     0  939M   0% /dev/shm
/dev/vda1       485M  112M  348M  25% /boot
/usr/tmpDSK     1.6G   35M  1.5G   3% /tmp

Please can someone help me resolve this issue, thanks



Solution 1:[1]

From the above output of 'df -h' the disk space is used by some file or folders in '/' location. As you are able to SSH in to the server follow the below steps and that will show the files that are using more space.

  • cd /
  • ls -lSr | tail -10

The first command [cd space slash] will direct you to the '/' folder and second command will list files based on its size. Please post the output of the above command. This will show the files that are using more space on the current directory. Once you can find this you will be able to remove the unused files (if any). Or you can contact the hosting provider to mount another harddisk space to '/' to migrate those files and free more space.

Solution 2:[2]

It could be coming from Jenkins, Docker or any other process. To solve that, you should clean logs and set it's size.

Solution 3:[3]

in your terminal type

cd /

then use this command:

du -h --max-depth=1

it will take some time, but you will get folder list with sizes enter image description here

as explained in details here: https://floyk.com/en/post/how-to-find-which-folders-are-taking-the-disk-space-by-using-terminal-on-linux

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Sandeep Sasikumar
Solution 2 T.Todua
Solution 3 Igor Simic