How can I safely remove /var/log/journal?

I am trying to clear up some space on my SSD (64 GB). In my search for space, I found /var/log/journal containing 5 GB in two folders. The two folders names are both NOT the current systemid.

So according to the information I found, this means I can safely delete them. Is that correct? Looking for confirmation.

P.S. I used

cat /etc/machine-id

to find out my systemid.

This doesn’t sound home assistant related.

Well it’s HAOS so… you meant to put this question in a different category :slight_smile:

I am unable to rename or delete these folders, they are on a read-only file system (when I connect with SSH to the Home Assistant IP). I think, if I want to remove these log files, I will have to SSH into the HAOS host by using a key pair.

It seems to me a fast solution is to reinstall HAOS.

If you are trying to adjust things in HAOS, it is highly not recommended.

Then HAOS should have some option to clear redundant log files, shouldn’t it? Now they are just taking up space. While HAOS 17 recommends at least 50% free disk space before starting migration.

If you insist, log into the OS’ shell and run something like this

journalctl --vacuum-size=128M

and also delete these directories if needed. They might even be empty. Also note that the machine ID differs inside an addon.
ha supervisor repair can also free some space.
Also see my check space guide.

Rebooting the host clears tmp as well.

Thanks guys. The storage space used by ‘system’ is now at 13 GB instead of 25 GB.

  • Logged into the OS shell
  • Found the proper current machine id
  • Deleted the /var/log/journal/[machine-id] folder that was no longer in use
  • Rebooted the host
  • Ran ha supervisor repair

This almost halved the storage used by system. Wonderful result.