https://github.com/2SSK/autoupd
A simple CLI too to automatically update system packages using your Linux distro's package manager, with daily logs and systemd integration.
https://github.com/2SSK/autoupd
featured
Last synced: 3 months ago
JSON representation
A simple CLI too to automatically update system packages using your Linux distro's package manager, with daily logs and systemd integration.
- Host: GitHub
- URL: https://github.com/2SSK/autoupd
- Owner: 2SSK
- License: mit
- Created: 2025-07-13T06:23:50.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2025-07-21T10:31:19.000Z (12 months ago)
- Last Synced: 2026-02-01T05:12:09.394Z (5 months ago)
- Topics: featured
- Language: Go
- Size: 373 KB
- Stars: 5
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-cli-apps-in-a-csv - autoupd - A simple CLI too to automatically update system packages using your Linux distro's package manager, with daily logs and systemd integration. (<a name="package-manager"></a>Package managers)
- awesome-cli-apps - autoupd - A simple CLI too to automatically update system packages using your Linux distro's package manager, with daily logs and systemd integration. (<a name="package-manager"></a>Package managers)
README
# autoupd
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:** `autoupd` automatically detects the package manager on your system, supporting a wide range of managers.
- **Automated Updates:** It sets up a `systemd` timer 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
1. **Detects Package Manager:** Automatically identifies the package manager on your system (e.g., `apt`, `pacman`, `dnf`).
2. **Updates Packages:** Runs the appropriate command to update all system packages.
3. **Automates with Systemd:** On the first run, it installs and enables a `systemd` timer to automate future updates.
- **Rolling-Release:** Runs daily.
- **Other Systems:** Runs weekly.
## Installation
### Prerequisites
- [Go](https://golang.org/doc/install) (for building from source)
- `git`
### Build from Source
```bash
# 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:
```bash
# 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:
```bash
sudo autoupd
```
This command will:
1. Ask for your password to gain `sudo` privileges.
2. Update all system packages.
3. Install and enable a `systemd` timer for automatic updates.
### Manual Updates
To force an update at any time, use the `--force` or `-f` flag:
```bash
sudo autoupd --force
```
### View Status
To view the status of `autoupd` without performing an update, use the `--status` or `-s` flag:
```bash
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:
```bash
systemctl status autoupd.timer
```
## Supported Package Managers
- `apt`
- `apk`
- `brew`
- `dnf`
- `flatpak`
- `nix`
- `pacman`
- `snap`
- `yay`
- `yum`
- `zypper`
## Logs
Logs are stored in `/var/log/autoupd`. You can view the latest log with:
```bash
cat /var/log/autoupd/.log
```
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.