An automated, user-space system update scheduler tailored for Arch Linux. This project utilizes Systemd User Timers, topgrade for overall package updates, and desktop notifications/dialogs (notify-send, yad) to provide a seamless background update experience without breaking your user environment or GUI permissions.
- Dual-Schedule Automation: Runs daily at 10:00 AM and 07:00 PM by default.
- Persistent Timers: Missed schedules (e.g., if the computer was turned off) trigger instantly upon boot.
- Network & Metered Awareness: Automatically checks internet connectivity and prompts the user before upgrading over data-metered/limited connections.
- Smart Safety Blocks: Prevents catastrophic updates by enforcing system rules when the machine hasn't been upgraded for an extended period (e.g., >3 months).
- Official News Parser: Fetches and reviews the latest official Arch Linux RSS feed; pauses upgrades if manual intervention guidelines are active. (If you read news by clicking button, script will work after 2 hours.)
- Advanced Reboot Detection: Scans post-upgrade system state and logs to determine if core updates (Kernel, Firmware, Systemd, Wayland/X11 components) require a system reboot.
Unlike generic scripts that run entire user tasks as root or grant global passwordless sudo privileges to users, this project prioritizes system isolation:
- User-Space Runtime: The main script runs within your local user session. This ensures desktop notifications, native environment variables (
DISPLAY,WAYLAND_DISPLAY), and AUR helper wrappers (yay/paru) function correctly without permission degradation. - Granular Privileges: The installer adds a strict ruleset under
/etc/sudoers.d/. Passwordless execution is restricted only to/usr/bin/topgrade. Even if a malicious script compromises your home directory, it cannot gain arbitrary root execution.
Ensure the following dependencies are installed on your Arch Linux machine prior to setup:
sudo pacman -S yad libnotify pacman-contrib networkmanager
yay -S topgrade needrestart
(Note: Ensure you have an AUR helper like yay or paru installed if you want AUR updates processed by Topgrade).
git clone https://github.com/ifazral/Arch-Auto-Updater.git
cd Arch-Auto-Updater
chmod +x arch-updater.sh arch-updater-installer.sh
⚠️ Important: Do NOT run this installer usingsudo. Run it as a standard user. It will ask for temporary administrative elevation when generating system files.
./arch-updater-installer.sh
To make sure your user-space timer is armed and waiting for the next runtime window:
systemctl --user status arch-updater.timer
systemctl --user list-timers --user
If you want to debug or force-run the updater service instantly via systemd:
systemctl --user start arch-updater.service
If the safety mechanism blocks your automated routine because the system was left un-upgraded for more than 3 months, update your system manually first (sudo pacman -Sy archlinux-keyring and sudo pacman -Syu), then clear the automated deadlock using:
~/.local/bin/arch-updater.sh continue
-
Script Destination:
~/.local/bin/arch-updater.sh -
Systemd Configurations: *
~/.config/systemd/user/arch-updater.service -
~/.config/systemd/user/arch-updater.timer -
Sudo Permissions Drop-In:
/etc/sudoers.d/99-custom-nopasswd -
Log & Cache Profiles:
~/.cache/arch_updater_*&~/.config/arch-updater/