Trợ giúp

Xin chào!

Cộng đồng này dành cho các chuyên gia và những người đam mê các sản phẩm và dịch vụ của chúng tôi.
Chia sẻ và thảo luận về nội dung tốt nhất và ý tưởng tiếp thị mới, xây dựng hồ sơ chuyên nghiệp của bạn và trở thành một nhà tiếp thị tốt hơn cùng nhau.

0

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

Ảnh đại diện
Admin

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

Ảnh đại diện
Huỷ bỏ
1 Trả lời
0
Ảnh đại diện
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

Ảnh đại diện
Huỷ bỏ