Ubuntu server shows me that I use almost all disk:
Usage of /: 95.5% of 118.12GB
And I try to find big folders and files, run ncdu
:
ncdu 1.8 ~ Use the arrow keys to navigate, press ? for help
--- / ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
5.5GiB [##########] /root
2.3GiB [#### ] /var
628.6MiB [# ] /usr
209.9MiB [ ] /lib
28.2MiB [ ] /boot
8.6MiB [ ] /bin
7.7MiB [ ] /sbin
6.6MiB [ ] /etc
208.0KiB [ ] /run
112.0KiB [ ] /tmp
48.0KiB [ ] /opt
e 16.0KiB [ ] /lost+found
8.0KiB [ ] /dev
8.0KiB [ ] /media
4.0KiB [ ] /lib64
e 4.0KiB [ ] /srv
e 4.0KiB [ ] /selinux
e 4.0KiB [ ] /mnt
e 4.0KiB [ ] /home
0.0 B [ ] /proc
0.0 B [ ] /sys
@ 0.0 B [ ] initrd.img
@ 0.0 B [ ] vmlinuz
According to ncdu
I use about 10 GiB
of 128 GiB
- it is about 10 %
. Contradiction.
How to clean my ubutntu server
without rebooting?
I thought that ncdu
lies and used another apps to find big files and folders. All of them shows the same result as ncdu
.
And df -h
command shows that disk is full.
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda 119G 113G 0 100% /
udev 2.0G 8.0K 2.0G 1% /dev
tmpfs 788M 212K 788M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 2.0G 0 2.0G 0% /run/shm
Update
sudo du -sch /*
result:
$ sudo du -sch
8.7M /bin
29M /boot
8.0K /dev
6.6M /etc
4.0K /home
0 /initrd.img
210M /lib
4.0K /lib64
16K /lost+found
8.0K /media
4.0K /mnt
48K /opt
du: cannot access `/proc/4470/task/4470/fd/4': No such file or directory
du: cannot access `/proc/4470/task/4470/fdinfo/4': No such file or directory
du: cannot access `/proc/4470/fd/4': No such file or directory
du: cannot access `/proc/4470/fdinfo/4': No such file or directory
0 /proc
5.0G /root
212K /run
7.8M /sbin
4.0K /selinux
4.0K /srv
0 /sys
112K /tmp
629M /usr
2.3G /var
0 /vmlinuz
8.1G total
8.1G
total as usual. But I see cannot access
rows, maybe problem because of them.
Then I checked the biggest folder in /
. It is /root
:
$ sudo du -sch /root
96K /root/Downloads
2.5G /root/Dropbox
36K /root/nohup.out
4.0K /root/npm-debug.log
4.0K /root/readonly
980K /root/redis-2.6.16.tar.gz
228M /root/tmp
2.7G total
du -sch /*
to see which root directories are using the most space, and descend from there into the places using the most space.8.1 GiB
full (added this to update). Cannot figure out where is the rest about100 GiB