帮助

欢迎!

This community is for professionals and enthusiasts of our products and services.
Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together.

0

/var/log/journal folder bigger size in Ubuntu, how to remove?

头像
Admin

In Ubuntu, /var/log/journal folder bigger size, I wonder whether I can delete them? The system is running low on space.

头像
丢弃
1 答案
0
头像
Admin
Best 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

头像
丢弃