DEV Community

Ruraam
Ruraam

Posted on

Stop manually updating GitHub `.deb` packages: I built a lightweight Bash tool

If you run Debian, Ubuntu, or Mint, you probably use tools like Discord, Obsidian, Fastfetch, or various CLI utilities that publish their latest builds directly as .deb assets on GitHub Releases instead of maintaining a proper APT PPA or repository.

The problem? Updating them is tedious:

  1. Go to the repo's release page.
  2. Find the right architecture asset (amd64, arm64).
  3. Download it viabrowser or curl.
  4. Install it with sudo dpkg -i ... and fix missing dependencies with apt --fix-broken install.

I wanted an automated, Obtainium-like experience for the Linux desktop/server, but without installing Python runtimes, Node packages, or untrusted binary blobs.

So I wrote debup — a zero-dependency Bash script.


What does it look like?

Tracking and installing a new tool is aone-liner:

Add and install a GitHub release package

debup add fastfetch-cli/fastfetch
Enter fullscreen mode Exit fullscreen mode

That's it. It queries GitHub's API, compares versions, pulls the right architecture, installs dependencies, and cleans up after itself.


Technical Details (Under the Hood)

Since the goal was to keep it strictly native to Debian-based systems, here area few implementation choices:

1. Safe Dependency Resolution

Instead of using the raw dpkg -i file.deb (which fails silently when dependencies are missing), debup invokes:

apt-get install -y ./package.deb
Enter fullscreen mode Exit fullscreen mode

This allows APT to resolve and fetch upstream Debian dependencies automatically in a single pass.

2.Accurate Version Comparison

Comparing versions with string equality ($local == $remote) often breaks because of tag naming quirks (e.g. v1.2.0 vs package version 1.2.0-1). We use Debian's native comparison tool instead:

dpkg --compare-versions "$local_ver" ge "$remote_ver"
Enter fullscreen mode Exit fullscreen mode

3. Graceful Cleanups

To prevent leftover .deb artifacts in /tmp if a user hits Ctrl+C or a download fails:
local

tmp_deb="/tmp/debup_${remote_ver}_${ARCH}.deb"
trap 'rm -f "$tmp_deb"' INT TERM EXIT
Enter fullscreen mode Exit fullscreen mode

4. Zero External Dependencies

Only uses standard core utilities already present on any Debian/Ubuntu install: bash, curl, grep, sed, dpkg, and apt.


Give it a spin

The project is fully open source on GitHub:

👉 github.com/Ruraam/debup

If you have feedback, packaging edge-cases to report, or ShellCheck improvements,feel free to open an issue or drop a comment below!

Top comments (0)