#!/bin/bash # CoreDesktop no longer installs nerdfetch (fastfetch does the same), Sitra # (fonts), Whisp (notes) or Codd (PostgreSQL). Remove them once. Install one # again yourself and update leaves it alone. Flatpaks' data stays in ~/.var/app. DROPPED=(nerdfetch) DROPPED_FLATPAKS=(io.github.sitraorg.sitra io.github.tanaybhomia.Whisp io.github.anil_e.Codd) for pkg in "${DROPPED[@]}"; do # The exact name: pacman -Q also matches a package that only provides it [ "$(pacman -Qq "$pkg" 2> /dev/null)" = "$pkg" ] || continue # Something else still needs it: leave it to go with that, as an orphan if [ "$(LC_ALL=C pacman -Qi "$pkg" | awk -F' *: *' '/^Required By/ { print $2 }')" != "None" ]; then sudo pacman -D --asdeps "$pkg" > /dev/null || exit 1 continue fi echo "Removing $pkg..." sudo pacman -Rns --noconfirm "$pkg" || exit 1 done for pak in "${DROPPED_FLATPAKS[@]}"; do if flatpak info --system "$pak" &> /dev/null; then echo "Removing $pak..." sudo flatpak uninstall --system --noninteractive "$pak" || exit 1 fi done exit 0