2024-08-05 21:03:42 +01:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
2024-08-15 07:13:56 +01:00
|
|
|
. ../common-script.sh
|
2024-08-05 21:03:42 +01:00
|
|
|
|
|
|
|
removeSnaps() {
|
|
|
|
case $PACKAGER in
|
|
|
|
pacman)
|
2024-08-23 14:12:47 +01:00
|
|
|
$ESCALATION_TOOL ${PACKAGER} -Rns snapd
|
2024-08-05 21:03:42 +01:00
|
|
|
;;
|
|
|
|
apt-get|nala)
|
2024-08-23 14:12:47 +01:00
|
|
|
$ESCALATION_TOOL ${PACKAGER} autoremove --purge snapd
|
2024-08-05 21:03:42 +01:00
|
|
|
if [ "$ID" = ubuntu ]; then
|
2024-08-23 14:12:47 +01:00
|
|
|
$ESCALATION_TOOL apt-mark hold snapd
|
2024-08-05 21:03:42 +01:00
|
|
|
fi
|
|
|
|
;;
|
|
|
|
dnf)
|
2024-08-23 14:12:47 +01:00
|
|
|
$ESCALATION_TOOL ${PACKAGER} remove snapd
|
2024-08-05 21:03:42 +01:00
|
|
|
;;
|
|
|
|
zypper)
|
2024-08-23 14:12:47 +01:00
|
|
|
$ESCALATION_TOOL ${PACKAGER} remove snapd
|
2024-08-05 21:03:42 +01:00
|
|
|
;;
|
|
|
|
*)
|
2024-09-17 03:44:20 +01:00
|
|
|
printf "%b\n" "${RED}Removing snapd not implemented for this package manager${RC}"
|
2024-08-23 14:12:47 +01:00
|
|
|
;;
|
2024-08-05 21:03:42 +01:00
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
|
|
|
checkEnv
|
2024-08-23 14:12:47 +01:00
|
|
|
checkEscalationTool
|
2024-08-05 21:03:42 +01:00
|
|
|
removeSnaps
|