I lost hard drive space on Ubuntu 22.04 and I don't know why.
I had more than 170GB of space two days ago. I did not install anything. Today I find that I'm losing space and it's down to 0% or 1.5% sometimes.
Filesystem Size Used Avail Use% Mounted on
tmpfs 1.6G 2.0M 1.6G 1% /run
/dev/sda2 641G 607G 1.6G 100% /
tmpfs 7.8G 87M 7.7G 2% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
/dev/sda1 487M 33M 454M 7% /boot/efi
tmpfs 1.6G 252K 1.6G 1% /run/user/1000
Also I deleted some files and folders and I recovered more then 20GB but after restarting the PC I found just 2GB. If I open anything like Google Chrome I have 0% space.
sudo du -h --max-depth=1 /var/log | sort -hr
and identify what directory is taking up the most space. From there, we'll start hunting deeper and deeper with this but lets start here. – Thomas Ward Nov 25 '22 at 18:30295G /var/log 4.0G /var/log/journal 2.0M /var/log/installer 440K /var/log/apt 120K /var/log/unattended-upgrades 72K /var/log/dist-upgrade 44K /var/log/cups 8.0K /var/log/hp 4.0K /var/log/speech-dispatcher 4.0K /var/log/samba 4.0K /var/log/private 4.0K /var/log/openvpn 4.0K /var/log/lightdm 4.0K /var/log/gdm3
– rrr171 Nov 25 '22 at 18:34291G /var/log/syslog
if I delete syslog it is ok or make some things wrong in system ?! – rrr171 Nov 25 '22 at 18:38tail -n 500 /var/log/syslog | sudo tee -a /var/log/syslog.snip
then runecho "" | sudo tee /var/log/syslog
and it'l clean up your syslog. The reason I want the snippet is because if your system is generating that many log messages on a regular basis, then something's likely busted on your computer. – Thomas Ward Nov 25 '22 at 18:40/var/log/syslog.snip
that we created and copy/paste the contents into your question as an edit. – Thomas Ward Nov 25 '22 at 18:40$ sudo journalctl --vacuum-time=10d
- might also be in place. – Hannu Nov 26 '22 at 10:12/var/log/syslog
very large space ... How can I stop it ?!! – rrr171 Nov 28 '22 at 08:16