Small all-architecture Debian package (all): one command to run apt update, upgrade, autoremove, autoclean, and clean in sequence, with optional cron scheduling (as root) and log rotation.
Intended for any APT-based system: Raspberry Pi OS, WSL with Ubuntu/Debian, and other.
Whenever possible, use your distribution’s built-in auto update tools instead of this package. For example, Linux Mint and some other distributions provide their own automatic update features.
The package declares dependencies on cron (or an equivalent), logrotate, and sudo.
sudo apt install ./apt-auto-update_*_all.deb| Command | Action |
|---|---|
sudo apt-auto-update run |
Run maintenance now |
sudo apt-auto-update enable |
Daily cron at 12:00 (noon), log /var/log/apt-auto-update.log |
sudo apt-auto-update enable --hour 2 |
Same at 2:00 |
sudo apt-auto-update disable |
Remove the /etc/cron.d/apt-auto-update fragment created by the tool |
apt-auto-update status |
Show whether scheduling is active |
- Installing the package does not enable cron; run
enablewhen you want it. apt remove: the generated cron entry is removed (debian/prerm).apt purge:apt-auto-updatelog files are removed (debian/postrm); the logrotate file is a normal Debian conffile.- Logs stay plain text (no gzip) for easy reading.
/usr/bin/apt-auto-update/usr/lib/apt-auto-update/run-maintenance.sh/etc/logrotate.d/apt-auto-update→/var/log/apt-auto-update.log
License: GPL-3+ (see debian/copyright and LICENSE).
From the repository root:
./build-apt-auto-update.shOutput:
apt-auto-update_<version>_all.debin the repository root (one level above theapt-auto-update/source directory)
Prerequisites:
build-essential,debhelper,fakeroot(providesdpkg-buildpackageand helpers)
git clone https://github.com/phramusca/apt-auto-update.git
cd apt-auto-update
sudo apt install build-essential debhelper fakeroot
./build-apt-auto-update.sh
sudo apt install ./apt-auto-update_*_all.deb