I
I
Ivseti2021-09-13 18:43:48
ubuntu
Ivseti, 2021-09-13 18:43:48

How to understand what is taking up disk space on a dedicated server?

The problem is this. I have 15 gig ssd in total. The www folder with sites weighs 6 gigabytes and 8 gigabytes are still occupied by no one knows what, and this value is constantly growing.

a request to search for large files does not help to find the reason, everything has been deleted, which is bad.

find / -mount -type f -ls 2> /dev/null | sort -rnk7 | head -10 | awk '{printf "%10d MB\t%s\n",($7/1024)/1024,$NF}'


What I've tried:
sudo apt-get clean
sudo apt-get autoremove

And some more commands to clean up all sorts of slag.

How can I understand what is taking up space on my website?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
ky0, 2021-09-13
@Ivseti

Go to the root, do it du -hs *. See the output, if you want to go to a directory that, in your opinion, occupies a lot, repeat the command.
There is still ncdu, it is more comfortable, but you need to set it separately.
PS - usually the first suspect is a log gardener .

A
Alexander Karabanov, 2021-09-13
@karabanov

Follow ncdu /
Next, act according to the situation.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question