Skip to content

Instantly share code, notes, and snippets.

@peterberkenbosch
Created April 21, 2026 18:54
Show Gist options
  • Select an option

  • Save peterberkenbosch/3e6e92a686a7c1b0b38c9cf1a46baa6c to your computer and use it in GitHub Desktop.

Select an option

Save peterberkenbosch/3e6e92a686a7c1b0b38c9cf1a46baa6c to your computer and use it in GitHub Desktop.
Omarchy AUR package maintenance: slack-desktop & heroku-cli

Cleaning up stale AUR packages on Omarchy

I ran omarchy-update today and noticed a couple of packages weren't getting the love they deserved. One was an orphaned foreign package no longer in the AUR, and another was stuck on an outdated AUR build. Here's how I fixed it — and automated it for the future.

The diagnosis

First, I checked what foreign packages I had installed:

pacman -Qm

This showed slack-bin as a foreign orphan. Digging deeper, slack-bin wasn't even in the AUR anymore — it had been replaced by slack-desktop. Meanwhile, heroku-cli-bin was still in the AUR but marked OutOfDate (v10.17.0 vs the current upstream v11.3.0). The standard yay -Sua run by omarchy-update couldn't help either of them.

Replacing slack-bin with slack-desktop

Since slack-bin was abandoned in the AUR, the clean path was to remove it and switch to the actively maintained slack-desktop:

# Remove the orphaned package
sudo pacman -R slack-bin

# Install the current AUR equivalent
yay -S slack-desktop

Now slack-desktop is tracked properly in the AUR, so every future omarchy-update will keep it current through the normal yay -Sua flow.

Moving Heroku CLI to npm

The AUR heroku-cli-bin was lagging behind upstream. Rather than manually bumping a PKGBUILD or waiting for a maintainer, I moved Heroku to npm where it can self-update cleanly:

# Remove the stale AUR package
sudo pacman -R heroku-cli-bin

# Install current release directly from npm
npm install -g heroku

Current version jumped from 10.17.0 → 11.3.0 immediately.

Automating future Heroku updates

The wrinkle: npm global packages aren't managed by pacman or yay, so omarchy-update won't touch them. Omarchy solves this with hooks.

I created a post-update hook at ~/.config/omarchy/hooks/post-update that runs automatically after every omarchy-update:

#!/bin/bash
set -e

# Update Heroku CLI (installed via npm globally, not AUR/pacman)
if command -v heroku &>/dev/null && command -v npm &>/dev/null; then
  HEROKU_CURRENT=$(heroku --version 2>/dev/null | grep -oP 'heroku/\K[0-9.]+' || echo "")
  HEROKU_LATEST=$(curl -s https://api.github.com/repos/heroku/cli/releases/latest | grep -oP '"tag_name": "v\K[^"]+' || echo "")

  if [[ -n "$HEROKU_LATEST" && "$HEROKU_CURRENT" != "$HEROKU_LATEST" ]]; then
    echo "Updating Heroku CLI: $HEROKU_CURRENT -> $HEROKU_LATEST"
    npm install -g heroku@latest
  else
    echo "Heroku CLI is up to date ($HEROKU_CURRENT)"
  fi
fi

Make it executable:

chmod +x ~/.config/omarchy/hooks/post-update

Now every time I run omarchy-update, the hook checks GitHub for a new Heroku CLI release and updates via npm if needed. Fully hands-off.

Result

Package Before After Update path
Slack slack-bin 4.43.51 (orphan) slack-desktop 4.49.81 AUR via yay -Sua
Heroku heroku-cli-bin 10.17.0 (stale) heroku 11.3.0 via npm post-update hook → npm install -g

The takeaway: run pacman -Qm every so often to spot orphaned or stale foreign packages. If something has disappeared from the AUR or is perpetually out of date, it's often cleaner to replace it with an actively maintained source — and use Omarchy's hooks to bridge the gap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment