0

I was prompted that I was running low on disk space, so I checked my disk useage and found a "syslog.1" file that was over 300GB. When I opened the file it was an endless stream of some tracking error. I naively gave myself sudo privileges and deleted the file, and now I'm dealing with the consequences. The file is no longer visible, but my disk useage remains full.

I gave my machine a restart, but now I'm locked out of the Ubuntu GUI and stuck with the tty2-6 terminals.

I tried to kill any process by running...

sudo lsof +L1

And finding the PIDs and...

sudo kill [PIDs]

However when I view my total disk useage with...

df -x squashfs --total

I still see the drive at 100% Use%.

At the moment I'm locked out of my machine, any help is greatly appreciated.

KitCat
  • 11
  • syslog should be connected to your journals. Clean your journals to the last 2 days like journalctl --vacuum-time=2d – kanehekili Jan 24 '23 at 00:09
  • The command only cleared 8mbs. I used sudo du -hfx /root | sort -rh |head -n 10 and found my /root is taking up 496 GBs. – KitCat Jan 24 '23 at 00:34

1 Answers1

0

My problem was created when I deleted the file as the root user, and it moved to the root user's Trash.

I found the culprit via...

sudo nautilus

I then navigated to...

/root/.local/share/Trash

Instead of "/home/yourname/.local.share/Trash". From here I cleared the trash by opening a terminal in the sudo privileged nautilus browser...

sudo rm -rf ~/.local/share/Trash*

Thanks to Roberto Gimenez https://askubuntu.com/a/1346012/887150

KitCat
  • 11
  • so you deleted that file via elevated file manager? – kanehekili Jan 24 '23 at 07:36
  • Yes. Additionally, I now limit the size of the logs via sudo nano /etc/logrotate.d/rsyslog and setting "size 100M". Thanks to https://stackoverflow.com/a/69465677 – KitCat Jan 24 '23 at 18:33