From d2ca6c6787d169d0bcd5f68cdcb39ec2f806cfd7 Mon Sep 17 00:00:00 2001 From: Jeremy McClure Date: Sat, 25 Jul 2026 22:49:39 -0400 Subject: [PATCH] Add pacman support for Arch Linux systems - Detect netbird installed via pacman - Remove netbird packages using pacman -Rns when replacing with binary install - Update README to document pacman support --- netbird-install-update/README.md | 3 ++- netbird-install-update/netbird-install-update.sh | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/netbird-install-update/README.md b/netbird-install-update/README.md index 23b3fec..45cfed3 100644 --- a/netbird-install-update/README.md +++ b/netbird-install-update/README.md @@ -166,7 +166,7 @@ The `--password` option provides a default sudo password for remote deployments. The script detects three installation states: 1. **Not Installed**: Netbird binary not found in PATH -2. **Package Manager Install**: Installed via apt, yum, dnf, zypper, or rpm-ostree +2. **Package Manager Install**: Installed via apt, yum, dnf, zypper, pacman, or rpm-ostree 3. **Binary Install**: Installed via the official curl-based installer Detection is performed by: @@ -405,6 +405,7 @@ Failed Hosts: - yum (RHEL/CentOS 7) - dnf (Fedora/RHEL 8+/CentOS 8+) - zypper (openSUSE) +- pacman (Arch Linux) - rpm-ostree (Fedora Silverblue) ### SELinux Support diff --git a/netbird-install-update/netbird-install-update.sh b/netbird-install-update/netbird-install-update.sh index ac6ecaa..9e3681b 100755 --- a/netbird-install-update/netbird-install-update.sh +++ b/netbird-install-update/netbird-install-update.sh @@ -298,6 +298,10 @@ detect_install() { fi return fi + if pacman -Q netbird &>/dev/null; then + echo "pkg:pacman" + return + fi echo "bin" } @@ -382,6 +386,7 @@ case "$1" in dnf) dnf remove -y netbird netbird-ui 2>/dev/null || true ;; zypper) zypper remove -y netbird netbird-ui 2>/dev/null || true ;; rpm-ostree) rpm-ostree uninstall -y netbird netbird-ui 2>/dev/null || true ;; + pacman) pacman -Rns --noconfirm netbird netbird-ui 2>/dev/null || true ;; esac USE_BIN_INSTALL=true SKIP_UI_APP=true bash /tmp/.netbird_install.sh chown root:root /usr/bin/netbird 2>/dev/null || true