#!/bin/bash # CoreDesktop installed libayatana-appindicator for building cline-desktop, # which cline-desktop-bin has since replaced. Remove it once, unless something # else needs it: then leave it to go with that, as an orphan. pkg=libayatana-appindicator # The exact name: pacman -Q also matches a package that only provides it [ "$(pacman -Qq "$pkg" 2> /dev/null)" = "$pkg" ] || exit 0 if [ "$(LC_ALL=C pacman -Qi "$pkg" | awk -F' *: *' '/^Required By/ { print $2 }')" != "None" ]; then sudo pacman -D --asdeps "$pkg" > /dev/null exit fi echo "Removing $pkg..." sudo pacman -Rns --noconfirm "$pkg"