Using a config file, this script finds updated debian repositories on github and downloads it so you can manually install it.
Find a file
2026-05-15 14:13:50 +01:00
github-deb-updater.sh fix: skip packages with dpkg rc status in installed_version() 2026-04-19 20:25:11 +01:00
LICENSE Add LICENSE, version rotation, fix default config path, update README 2026-03-15 19:02:16 +00:00
packages.conf Add LICENSE, version rotation, fix default config path, update README 2026-03-15 19:02:16 +00:00
README.md Updated README 2026-05-15 14:13:50 +01:00

github-deb-updater

License: Unlicense

Created by fromport. Released into the public domain under The Unlicense.

Checks GitHub releases for newer .deb packages for the correct architecture and downloads them automatically. Optionally installs them as well.

Example package: Signal Desktop (unofficial ARM64 build)

The default packages.conf uses Signal Desktop as an example. Signal's official releases do not include an ARM64 build. Dennis Ameling maintains an unofficial ARM64 port at dennisameling/Signal-Desktop which is exactly the kind of package this tool is designed for — not available via apt, released on GitHub, architecture-specific.

Requirements

sudo apt install curl jq

Installation

# Install script
sudo cp github-deb-updater.sh /usr/local/bin/github-deb-updater.sh
sudo chmod +x /usr/local/bin/github-deb-updater.sh

# Config and download directory
mkdir -p ~/.config/github-deb-updater
cp packages.conf ~/.config/github-deb-updater/packages.conf
mkdir -p ~/Downloads/deb-updates

Usage

# Check and download only (safe default)
github-deb-updater.sh --config ~/.config/github-deb-updater/packages.conf

# With auto-install (requires sudo)
github-deb-updater.sh --config ~/.config/github-deb-updater/packages.conf --install

# Custom download location
github-deb-updater.sh --download-dir /opt/deb-updates

Real-world example

Running the script manually when a newer version is available:

2026-03-15 18:40:47 [github-deb-updater] Starting check (architecture: arm64)
2026-03-15 18:40:47 [github-deb-updater] Download directory: /home/fromport/Downloads/deb-updates
2026-03-15 18:40:47 [github-deb-updater] --- Checking: signal-desktop-unofficial (dennisameling/Signal-Desktop, arch: arm64) ---
2026-03-15 18:40:47 [github-deb-updater]   Installed: 8.2.0
2026-03-15 18:40:48 [github-deb-updater]   Available on GitHub: 8.2.1 (tag: v8.2.1)
2026-03-15 18:40:48 [github-deb-updater]   Newer version found: 8.2.0 -> 8.2.1
2026-03-15 18:40:48 [github-deb-updater]   Downloading: https://github.com/dennisameling/Signal-Desktop/releases/download/v8.2.1/signal-desktop-unofficial_8.2.1_arm64.deb
2026-03-15 18:40:58 [github-deb-updater]   Download successful: /home/fromport/Downloads/deb-updates/signal-desktop-unofficial_8.2.1_arm64.deb
2026-03-15 18:40:58 [github-deb-updater]   Ready to install with: sudo dpkg -i /home/fromport/Downloads/deb-updates/signal-desktop-unofficial_8.2.1_arm64.deb
2026-03-15 18:40:58 [github-deb-updater] === Done: 1 update(s) downloaded, 0 error(s) ===

If the file was already downloaded (e.g. on a previous run), it is skipped:

2026-03-15 18:41:10 [github-deb-updater]   Already downloaded: /home/fromport/Downloads/deb-updates/signal-desktop-unofficial_8.2.1_arm64.deb

Setting up cron

crontab -e

Daily at 08:00, download only (recommended):

0 8 * * * /usr/local/bin/github-deb-updater.sh \
    --config /home/fromport/.config/github-deb-updater/packages.conf \
    --download-dir /home/fromport/Downloads/deb-updates \
    >> /var/log/github-deb-updater.log 2>&1

GitHub API rate limiting

The GitHub API allows 60 requests/hour without authentication. For more packages or if you get rate-limited:

# Create a token at: https://github.com/settings/tokens
# (no scopes needed for public repos)
export GITHUB_TOKEN="ghp_xxxxxxxxxxxxx"

Or set it in your crontab:

0 8 * * * GITHUB_TOKEN=ghp_xxx /usr/local/bin/github-deb-updater.sh ...

Version rotation

By default, the 3 most recent .deb files per package are kept. Older files are automatically removed after a new download. Configure this with the KEEP_VERSIONS column in packages.conf:

signal-desktop-unofficial | dennisameling/Signal-Desktop | arm64 | false | 3

Set to 0 to disable cleanup and keep all downloaded versions.

Architecture in filenames

Some projects use different names than dpkg --print-architecture:

  • arm64 vs aarch64
  • amd64 vs x86_64

Use the ARCH_OVERRIDE column in packages.conf to handle this.

Security considerations

  • Auto-install (--install) is disabled by default — inspect downloads first
  • Files are not re-downloaded if already present
  • No shell evaluation of external data; version comparison via dpkg --compare-versions
  • No telemetry or external connections other than api.github.com and the download URL