Help with my simple update-maintenance script

Something to think about

  • There may be a pamac clean service/timer running on your behalf automatically already. By default I believe it keeps 3 versions (/etc/pamac.conf) of a package in cache (/var/cache/pacman/pkg/), and runs the first Saturday of a month at 15:00.
   # List status of the service and timer
    ===> systemctl status pamac-cleancache.{service,timer}

    # List all timers
    ===> systemctl list-timers  
  • Might want to incorporate a pacdiff at the end of an upgrade to look for any .pacnew files. There should be some message on the console or log (/var/log/pacman.log) about a .pacnew file being created.

  • A reminder to read the Stable Announcement forum (at least the first 2 entries) for the upgrade.

  • If you are new to bash scripting and/or command line you might find LinuxCommand.org: Learn The Linux Command Line. Write Shell Scripts., helpful.

Questioning

  1. I believe a user needs to run pacman-mirrors -f instead or in addition to --continent. The man page says country and fasttrack are mutually exclusive. One option builds the custom mirrorlist and the other builds the runtime mirrorlist (/etc/pacman.d/mirrorlist) based on some “speed” tests.

  2. I don’t think keys need to be updated separately unless there is a problem. It is usually done as part of the upgrade, and at the beginning. I could be wrong, but I don’t think this is necessary.

1 Like