• Re: Cleaning up stale logs in Bookworm

    From bp@bp@www.zefox.net to comp.sys.raspberry-pi on Sun Sep 14 20:04:50 2025
    From Newsgroup: comp.sys.raspberry-pi

    The Natural Philosopher <tnp@invalid.invalid> wrote:
    Are these old style logs or the dreaded systemd?


    This is a systemd machine, but after looking around in response to
    suggestions made above it seems less than 5 MB is used by journals.
    That's not enough to matter.

    Evidently I've just added too many packages.

    Is there some way to coax the Add/Remove Programs application
    to list installed packages, ideally by size? Then I can clean
    house manually. The chromium browser will likely be the first
    to go 8-)

    Thanks to all for replying, and apologies for the misguided question!

    bob prohaska

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Lawrence =?iso-8859-13?q?D=FFOliveiro?=@ldo@nz.invalid to comp.sys.raspberry-pi on Sun Sep 14 21:25:18 2025
    From Newsgroup: comp.sys.raspberry-pi

    On Sun, 14 Sep 2025 20:04:50 -0000 (UTC), bp wrote:

    Evidently I've just added too many packages.

    One occasional problem I had on my previous laptop was it would fill up
    the root partition every now and then with old cached package files. These
    are normally not needed after the package is actually installed.

    Check your disk usage for this cache with

    du -ks /var/cache/apt/archives/

    and see if it looks excessive. Anything you delete from there should be automatically downloadable again if itrCOs needed. ;)
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From bp@bp@www.zefox.net to comp.sys.raspberry-pi on Sun Sep 14 21:35:27 2025
    From Newsgroup: comp.sys.raspberry-pi

    Lawrence DrCOOliveiro <ldo@nz.invalid> wrote:
    On Sun, 14 Sep 2025 20:04:50 -0000 (UTC), bp wrote:

    Evidently I've just added too many packages.

    One occasional problem I had on my previous laptop was it would fill up
    the root partition every now and then with old cached package files. These are normally not needed after the package is actually installed.

    Check your disk usage for this cache with

    du -ks /var/cache/apt/archives/

    and see if it looks excessive. Anything you delete from there should be automatically downloadable again if itrCOs needed. ;)

    Bingo! It's over one GB. Not my whole problem, but a big chunk of it.

    Thank you!

    bob prohaska

    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From Knute Johnson@knute2025@585ranch.com to comp.sys.raspberry-pi on Sun Sep 14 16:37:25 2025
    From Newsgroup: comp.sys.raspberry-pi

    On 9/14/25 15:04, bp@www.zefox.net wrote:
    The Natural Philosopher <tnp@invalid.invalid> wrote:
    Are these old style logs or the dreaded systemd?


    This is a systemd machine, but after looking around in response to suggestions made above it seems less than 5 MB is used by journals.
    That's not enough to matter.

    Evidently I've just added too many packages.

    Is there some way to coax the Add/Remove Programs application
    to list installed packages, ideally by size? Then I can clean
    house manually. The chromium browser will likely be the first
    to go 8-)

    Thanks to all for replying, and apologies for the misguided question!

    bob prohaska


    Edit /etc/systemd/journald.conf file to enable SystemMaxUse and set it
    equal to some value that will give you enough but not too much logs. I
    use 128M. If you have files building up in /var/log, every month I
    delete all the .gz archived logs. This is an example script:

    #!/bin/bash

    echo "delete-old-logs"

    rm -v /var/log/*.gz
    rm -v /var/log/apache2/*.gz
    rm -v /var/log/apt/*.gz
    rm -v /var/log/cups/*.gz
    rm -v /var/log/lightdm/*.gz
    rm -v /var/log/unattended-upgrades/*.gz

    Change or add to the list above according to you actual needs.

    8GB if you have a desktop installed is probably a little small for
    Bookworm. I tell my employer he needs to use a 16GB uSD for Bookworm
    with a desktop. 8GB was fine on Buster but just isn't enough any more.
    --

    Knute Johnson
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From druck@news@druck.org.uk to comp.sys.raspberry-pi on Tue Sep 16 00:10:51 2025
    From Newsgroup: comp.sys.raspberry-pi

    On 14/09/2025 22:37, Knute Johnson wrote:
    If you have files building up in /var/log, every month I
    delete all the .gz archived logs.-a This is an example script:

    [snip]

    Use logrotate rather than munging your own script, that's what its there
    for. Otherwise you can guarantee the source of your problem is in the
    logs you just have just deleted.

    ---druck
    --- Synchronet 3.21a-Linux NewsLink 1.2
  • From The Natural Philosopher@tnp@invalid.invalid to comp.sys.raspberry-pi on Tue Sep 16 00:34:41 2025
    From Newsgroup: comp.sys.raspberry-pi

    On 16/09/2025 00:10, druck wrote:
    On 14/09/2025 22:37, Knute Johnson wrote:
    -aIf you have files building up in /var/log, every month I delete all
    the .gz archived logs.-a This is an example script:

    [snip]

    Use logrotate rather than munging your own script, that's what its there for. Otherwise you can guarantee the source of your problem is in the
    logs you just have just deleted.

    ---druck

    +1 Logrotate for 'ordinary' logs and systemd configs for logs that it generates

    But it seems they were logs so much as cached packages
    --
    Canada is all right really, though not for the whole weekend.

    "Saki"

    --- Synchronet 3.21a-Linux NewsLink 1.2