How to safely delete Linux System Logs
Vložit
- čas přidán 29. 08. 2024
- Managing logfiles is a bit weirder in systemd/journalctl. Here's how to safely clean up old logfiles in Linux.
journalctl --vacuum-time=2d
journalctl --vacuum-size=100M
devopsintervie...
Free Linux Sysadmin Course Playlist: • The Linux Basics Cours...
Check out my step-by-step project-based Linux course for beginners, 93% off when you use this link: www.udemy.com/...
Patreon: / tutorialinux
Official Site & e-mail list: tutorialinux.com/
Twitter: / tutorialinux
Facebook: / tutorialinux
Podcast: kernelpanicpodc...
I was afraid my virtual box was going to explode, thanks my man.
Coincidence, I just cleaned my logs 5 days ago before this video and I had something like 6GB of logs
@Owen Cory I think you wanted to leave this comment to another video
--vacuum-size= will not always free up space as requested because it won't look into recent logs.
--vacuum-size= removes the OLDEST ARCHIVED journal files until the disk space they use falls below the specified size (specified with the usual "K", "M", "G" and "T" suffixes), or ALL ARCHIVED journal files contain no data older than the specified timespan (specified with the usual "s", "m", "h", "days", "months", "weeks" and "years" suffixes).
Thanks
Thanks! I had 3.5G of logs on a tiny 50G partition :(
very nice! thanks. Had 968M after only 3 months.
your channel is really good my dude!
My problem is it's the "syslog" spitting out hundreds of gigabytes of garbage data, none of the parsing or vaccum tricks seem to work there.
my syslog is 200GB and i installed ubuntu 2 days ago. how could this happen?
this is great bur this can use only for journal logs not all system logs
That's true, if you have applications that are writing plaintext logfiles outside the systemd journal you'll want to set up logrotate configs to manage them.
Thank you, sir.
Really nice
Is it bad if i just 'sudo rm /var/log' ?
Hi maybe you have a video about troubleshooting in linux webserver ?
Journal needs a cuddle. System(d) needs a cuddle. Sys(tem) needs a cuddle. Network needs a cuddle. ALSA needs a cuddle. Pulse Audio needs two cuddles. Home needs a cuddle. Locale needs a cuddle. CUPS needs a cuddle...
We all need a cuddle.
Can you provide the commands you ran in the description please...or a link to what you are running?
man journalctl
Or
journalctl --help
Done!
Can it be done by Bleachbit?
Mmm... Niii
I would say use it just for the cache, don't trust too much that software
After all are just a few commands, use journalctl for this particular task about system logs
@@GooogleGoglee
I see...
I like sudo !!.
holy crap - I have 4.1G worth of logfiles on my system
Systemd bitterness is bitter.
4GB of logs lol
I'm not saying cuddle or cuttle . It's dumb sounding.
rotate it