I agree. Suggesting any sudo command without an explanation of exactly what it will change, is very irresponsible.
There are any number of new users who might copy and paste a command just because it comes from a “reputable source”. Or worse, type it out and get part wrong, and do real damage.
(I realize that this particular command is relatively safe, but this is just a bad practice)
Au Contraire! I appreciate the command because I had no idea how to remove logs that were clogging the system. They removed a couple of gigabytes of “stuff” that I didn’t know existed…
If you are going to blithely supply commands that run with root access, you OWE it to the users here to explain exactly what is going to happen. Full stop.
The files are fixed size and there’s a fixed limit on maximum history that’s set based on (essentially) a fraction of available RAM.
Which brings us to the second point, which is that manually vacuuming the journal files is basically pointless because the journal files are fixed in size and stored in RAM only (note how all the “cleaned” paths are under /run). There’s really no point in doing this. It will temporarily free a small amount of RAM (and if you’re that low on available memory, you have other problems) but then it’ll just consume the space again as it moves back towards the steady state.
Thanks @obj for clarification. I was not aware of this, and thought vacuuming will clear old logs accumulated over months and years and will free up substantial disk space.