Skip to content

Antiz96/arch-update

Repository files navigation

Arch-Update

Table of contents

Description

An interactive update notifier & applier for Arch Linux that assists you with important pre / post update tasks.
Includes a systray applet for an easy integration with any desktop / graphical environment.

Arch-Update is designed to follow usual system maintenance steps, as described in the Arch Wiki.

Features:

  • Automatic check and listing of available updates.
  • Check for recent Arch Linux news (and offers to display them if there are).
  • Check for orphan packages (and offers to remove them if there are).
  • Check for old & uninstalled packages in cache (and offers to remove them if there are).
  • Check for pacnew & pacsave files (and offers to process them if there are).
  • Check for pending kernel update requiring a reboot (and offers to do so if there's one).
  • Check for services requiring a post upgrade restart (and offers to do so if there are).
  • Support for sudo, sudo-rs, doas & run0.
  • Extensive CLI.

Optional support for:

  • AUR packages (via paru, yay or pikaur).
  • Flatpak packages (via flatpak).
  • Desktop notifications (via libnotify).
  • Check for ALHP build queue or outdated mirrors (via alhp-utils).

Installation

AUR

Install the arch-update AUR package (also check the list of optional dependencies for anything you may want or need).

From Source

Install required runtime dependencies:

sudo pacman -S --needed bash systemd pacman pacman-contrib archlinux-contrib glibc libgcc curl fakeroot htmlq diffutils hicolor-icon-theme glib2 xdg-utils util-linux

Additional optional dependencies you might want or need:

Install required build dependencies:

sudo pacman -S --asdeps make scdoc bats cargo

Download the archive of the latest stable release and extract it (alternatively, you can clone this repository with git).

To build and install arch-update, go into the extracted / cloned directory and run the following commands:

make
make test
sudo make install

Once the installation is complete, you may optionally clean up the directory of files generated during installation by running the following command:

make clean

To uninstall arch-update, go into the extracted / cloned directory and run the following command:

sudo make uninstall

Usage

For desktop machines, the usage consist of starting the systray applet and enabling the automated update checks.
For headless machines, Arch-Update includes an extensive CLI.

The systray applet

To start the systray applet and enable it automatically at boot, run the following command (preferred method for most environments, uses XDG Autostart):

arch-update --tray --enable

In case your graphical environment doesn't support XDG Autostart, add the following command your environment auto-start method instead:

arch-update --tray

The systray icon dynamically changes to indicate the current state of your system ('up to date' or 'updates available'). When clicked, it launches arch-update in a terminal window via the arch-update.desktop file.
The systray applet menu shows further information (like the list of pending updates, time of the last and next checks, ...) and allows to trigger specific actions (like running Arch-Update, check for updates, ...). See screenshots for more details.

If the systray applet doesn't start at boot regardless or if it doesn't work as expected (e.g the icon is missing or the click actions do not act as they should), please read this chapter.
If clicking the systray applet does nothing, please read this chapter.

Note: GNOME shell does not support systray icons natively, GNOME users need to install the "AppIndicator and KStatusNotifierItem Support" extension for the systray applet to work.

The automated update checks

To enable automated and periodic checks for available updates, run the following command:

arch-update --check --enable

By default, a check is performed at boot and then once every 6 hours. The check cycle can be customized, see this chapter.

Screenshots

Once started, the systray applet appears in the systray area of your panel.
It is the first icon on the left in the screenshot below (note that there are different color variants available for it):

icon

With the automated update checks enabled, checks for updates are automatically and periodically performed, but you can manually trigger one from the systray applet icon by right-clicking it and then clicking on the Check for updates menu entry. You can also see timestamps report for the last and next update checks:

check_for_updates

If there are new available updates, the systray icon shows a red circle and a desktop notification indicating the number of available updates is sent. You can directly run Arch-Update from it or close / dismiss it thanks to the related click actions:

notif

You can see the list of available updates from the menu by right-clicking the systray icon.
A dropdown menu displaying the number and the list of pending updates is dynamically created for each sources that have some (Packages, AUR, Flatpak).
A "All" dropdown menu gathering the number and the list of pending updates for all sources is dynamically created if at least 2 different sources have pending updates:

Clicking on the entry for a package opens the upstream project's URL in your web browser (except for Flatpak packages).

all

packages

aur

When the systray icon is left-clicked, arch-update is run in a terminal window (alternatively, you can click the "X update(s) available" entry or the dedicated "Run Arch-Update" one from the right-click menu):

run

If at least one Arch Linux news has been published since the last run, Arch-Update will offer you to read the latest Arch Linux news directly from the terminal window.
The news published since the last run are tagged as [NEW]:

news

If no news has been published since the last run, Arch-Update directly asks for your confirmation to proceed with update.

From there, just let Arch-Update guide you through the various steps required for a complete and proper update of your system! 😄

Certain options can be enabled, disabled or modified via the arch-update.conf configuration file. See the arch-update.conf(5) man page for more details.

Documentation

arch-update

See arch-update --help and the arch-update(1) man page.

arch-update configuration file

See the arch-update.conf(5) man page.

Tips & tricks and troubleshooting

Modify the check cycle

If you enabled the automated update checks, a check for available updates is automatically launched at boot and then once each 6 hours.

If you want to customize the check cycle, run systemctl --user edit --full arch-update.timer and modify the OnUnitActiveSec value to your liking.
For instance, if you want Arch-Update to check for new updates every 4 hours instead:

[...]
[Timer]
OnStartupSec=15
OnUnitActiveSec=4h
[...]

Time units are s for seconds, m for minutes, h for hours, d for days...
See https://www.freedesktop.org/software/systemd/man/latest/systemd.time.html#Parsing%20Time%20Spans for more details.

In case you want Arch-Update to check for new updates only once at boot, you can simply delete the OnUnitActiveSec line completely.

Note: GNOME shell does not support systray icons natively, GNOME users need to install the "AppIndicator and KStatusNotifierItem Support" extension for the systray applet to work.

The systray applet does not start at boot or does not work as expected

Make sure you followed instructions of this chapter.

If the systray applet doesn't start at boot regardless or if it doesn't work as expected (e.g the icon is missing or the click actions do not act as they should), this could be the result of a race condition.

To prevent that, you can add a small delay to the systray applet startup using the sleep command:

  • If you used arch-update --tray --enable, modify the Exec= line in the arch-update-tray.desktop file (which is under ~/.config/autostart/ by default) like so:
Exec=/bin/sh -c "sleep 3 && arch-update --tray"
  • If you added the arch-update --tray command to the auto-start method of your environment, modify the command like so:
sleep 3 && arch-update --tray

If the systray applet still does not start at boot, you can eventually try to gradually increase the sleep value.
Otherwise, feel free to open a bug report.

Run Arch-Update in a specific terminal emulator

gio (used to launch the arch-update terminal application via the arch-update.desktop file when the systray applet is clicked) currently has a default limited list of known terminal emulators.
As such, if you don't have any of these "known" terminal emulators installed on your system, you might face an issue where clicking the systray applet does nothing (as gio couldn't find a terminal emulator from the said list). Incidentally, you might have multiple terminal emulators installed on your system and you may want to force Arch-Update to use a specific one. In both cases, you can specify which terminal emulator to use.

To do so, install the xdg-terminal-exec AUR package, create the ~/.config/xdg-terminals.list file and add the name of the .desktop file of your terminal emulator of choice in it (e.g. Alacritty.desktop).
See https://github.com/Vladimir-csp/xdg-terminal-exec?tab=readme-ov-file#configuration for more details.

Contributing

See the contributing guidelines.

License

Arch-Update is licensed under the GPL-3.0 license (or any later version of that license).

About

An interactive update notifier & applier for Arch Linux that assists you with important pre / post update tasks (including a systray applet and extensive CLI).

Topics

Resources

Contributing

Security policy

Stars

Watchers

Forks

Releases

Sponsor this project

Packages

Contributors

Languages