linutil/core/tabs/system-setup/remove-snaps.sh
Adam Perkowski 216f1a4836
Restructure the crates (#549)
* BIG CHANGES

* core metadata

* Added readme.md to the package

* Moved the crate back to tui

Co-authored-by: Liam <lj3954@users.noreply.github.com>

---------

Co-authored-by: Liam <lj3954@users.noreply.github.com>
2024-09-19 19:09:53 -05:00

31 lines
722 B
Bash

#!/bin/sh -e
. ../common-script.sh
removeSnaps() {
case "$PACKAGER" in
pacman)
"$ESCALATION_TOOL" "$PACKAGER" -Rns snapd
;;
apt-get|nala)
"$ESCALATION_TOOL" "$PACKAGER" autoremove --purge snapd
if [ "$ID" = ubuntu ]; then
"$ESCALATION_TOOL" apt-mark hold snapd
fi
;;
dnf)
"$ESCALATION_TOOL" "$PACKAGER" remove snapd
;;
zypper)
"$ESCALATION_TOOL" "$PACKAGER" remove snapd
;;
*)
printf "%b\n" "${RED}Removing snapd not implemented for this package manager${RC}"
;;
esac
}
checkEnv
checkEscalationTool
removeSnaps