In Ubuntu, /var/log/journal folder bigger size, I wonder whether I can delete them? The system is running low on space.
1 Answer
1. Check size
du -sh /var/log/journal/
4.0G /var/log/journal/20211021102706303852921744565375
or
journalctl --disk-usage
Archived and active journals take up 3.9G on disk.
2. Clean space
sudo journalctl --vacuum-size=500M
or based on time:
sudo journalctl --vacuum-time=10d
3. Set the parameter
sudo nano /etc/systemd/journald.conf
SystemMaxUse=500M
If Nano is not present on your computer, you can install it with the following commands:
- To install Nano on Ubuntu and Debian run: sudo apt install nano
- To install it on CentOS and Fedora, run this: sudo yum install nano.
You can restart the service like so if need. $ sudo systemctl restart systemd-journald.service