Archlinux provides an handy script called checkupdates, to check for available pacman updates without requiring the root password. This post will explain how to use this tool to automatically get a nice notification whenever new updates are ready to be installed.

The notifier script

Create a simple script that runs checkupdates and sends a notification if necessary:

#!/usr/bin/env bash
n=$(checkupdates | wc -l)
if [ "$n" != "0" ]; then
    notify-send "System update" "$n updates available."

Put this script in a location in your $PATH and make sure is executable. In this example I will use ~/bin/

Periodically run the script

We are going to use systemd timer to periodically execute the script. Systemd timers are easy to create (I hate the syntax of cron!) and don’t require root privileges.

Create the service file

Create the file ~/.config/systemd/user/updates-notifier.service with the following content:

Description=Check and notify pacman updates

# replace the path of your notifier script

This will take care to execute the notifier script.

Create the timer file

Create the file ~/.config/systemd/user/updates-notifier.timer with the following content:

Description=Runs updates-notifier.service every hour

# Time to wait after booting before we run first time
# Time between running each consecutive time


This timer will simply trigger the updates-notifier.service every hour.

Enable the timer

Just run:

$ systemctl --user start updates-notifier.timer

This is the resulting notification in a Plasma desktop!

Example of pacman notification