mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-06 05:29:42 +00:00
29 lines
594 B
Bash
29 lines
594 B
Bash
#!/bin/sh -e
|
|
|
|
. ./common-script.sh
|
|
|
|
removeSnaps() {
|
|
case $PACKAGER in
|
|
pacman)
|
|
sudo ${PACKAGER} -Rns snapd
|
|
;;
|
|
apt-get|nala)
|
|
sudo ${PACKAGER} autoremove --purge snapd
|
|
if [ "$ID" = ubuntu ]; then
|
|
sudo apt-mark hold snapd
|
|
fi
|
|
;;
|
|
dnf)
|
|
sudo ${PACKAGER} remove snapd
|
|
;;
|
|
zypper)
|
|
sudo ${PACKAGER} remove snapd
|
|
;;
|
|
*)
|
|
echo "removing snapd not implemented for this package manager"
|
|
esac
|
|
}
|
|
|
|
checkEnv
|
|
removeSnaps
|