Perform a fast and safe clearing of the /var/log/journal folder.
Can we remove files from the
/var/log/journal folder? Yes, indeed. It’s completely fine as long as you don’t require the logs for troubleshooting.
/var/log/journal folder takes up a lot of space on the system.
How do I safely clear a big /var/log/journal folder?
You can safely clean
/var/log/journal and delete all of the files there, but you cannot delete the directory itself.
Determine how much disc space /var/log/journal consumes
Clear (reduce) the folder size instantly
Let’s say you want to reduce the log size to a specific size. Let’s then delete old log files from the
/var/log/journal folder and reduce the folder size to 100 MB.
Note that vacuuming only removes archived journal files, not active ones. To remove everything, you must first rotate the files so that recent entries are moved to inactive files.
Control the amount of disc space that /var/log/journal can utilise
We can change the configuration file
Add the following line at the bottom of the configuration file.
Then, on your keyboard, press Ctrl+X to exit the Nano text editor. Before quitting, you will be asked to confirm that you wish to save the changes. To save and leave Nano, simply press Y on your keyboard, then press Enter.
To force a log rotation, you may need to restart the logging service.