Skip to content
/ autoupd Public

A simple CLI too to automatically update system packages using your Linux distro's package manager, with daily logs and systemd integration.

License

Notifications You must be signed in to change notification settings

2SSK/autoupd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

autoupd

autoupd Logo

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.

Autoupd gif

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 (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:

  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:

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

  • 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:

cat /var/log/autoupd/<today's-date>.log

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A simple CLI too to automatically update system packages using your Linux distro's package manager, with daily logs and systemd integration.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages