autoupd
July 21, 2025 ยท View on GitHub
A simple, zero-config tool to automatically update your system packages.
autoupd is a "set it and forget it" utility for keeping your system up-to-date. It automatically detects your system's package manager, performs an update, and sets up a systemd timer to run daily for rolling-release distros or weekly for others.
Features
- Automatic Package Manager Detection:
autoupdautomatically detects the package manager on your system, supporting a wide range of managers. - Automated Updates: It sets up a
systemdtimer to run updates daily on rolling-release distributions and weekly on others. - Status Dashboard: A simple and intuitive dashboard to view the status of your updates.
- Force Updates: Manually trigger an update at any time.
- Desktop Notifications: Get notified about the status of your updates.
- Logging: All update operations are logged to
/var/log/autoupd.
How It Works
- Detects Package Manager: Automatically identifies the package manager on your system (e.g.,
apt,pacman,dnf). - Updates Packages: Runs the appropriate command to update all system packages.
- Automates with Systemd: On the first run, it installs and enables a
systemdtimer to automate future updates.- Rolling-Release: Runs daily.
- Other Systems: Runs weekly.
Installation
Prerequisites
- Go (for building from source)
git
Build from Source
# Clone the repository
git clone https://github.com/2SSK/autoupd.git
# Navigate to the project directory
cd autoupd
# Build the binary
go build .
# Move the binary to your PATH
sudo cp autoupd /usr/local/bin/
# Run autoupd for the first time to set up automation
sudo autoupd
Uninstallation
To remove autoupd and its related files from your system:
# Stop and disable the systemd timer
sudo systemctl stop autoupd.timer
sudo systemctl disable autoupd.timer
# Remove the systemd files
sudo rm /etc/systemd/system/autoupd.service
sudo rm /etc/systemd/system/autoupd.timer
# Remove the binary
sudo rm /usr/local/bin/autoupd
# Remove the log directory
sudo rm -rf /var/log/autoupd
Usage
After installation, autoupd will run automatically. You can also run it manually.
First Run
To perform the initial update and activate the systemd timer, run:
sudo autoupd
This command will:
- Ask for your password to gain
sudoprivileges. - Update all system packages.
- Install and enable a
systemdtimer for automatic updates.
Manual Updates
To force an update at any time, use the --force or -f flag:
sudo autoupd --force
View Status
To view the status of autoupd without performing an update, use the --status or -s flag:
autoupd --status
This will display a dashboard with information about the last and next update times.
Automatic Updates
autoupd uses a systemd timer to run automatically.
- Service:
/etc/systemd/system/autoupd.service - Timer:
/etc/systemd/system/autoupd.timer
You can check the status of the timer with:
systemctl status autoupd.timer
Supported Package Managers
aptapkbrewdnfflatpaknixpacmansnapyayyumzypper
Logs
Logs are stored in /var/log/autoupd. You can view the latest log with:
cat /var/log/autoupd/<today's-date>.log
License
This project is licensed under the MIT License - see the LICENSE file for details.