mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-12-24 12:29:44 +00:00
add option to remove snaps
This commit is contained in:
parent
6f865f76ef
commit
7609d755a7
28
src/commands/system-setup/4-remove-snaps.sh
Normal file
28
src/commands/system-setup/4-remove-snaps.sh
Normal file
|
@ -0,0 +1,28 @@
|
|||
#!/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
|
Loading…
Reference in New Issue
Block a user