if command -v snap &> /dev/null; then echo "Removing snapd" # Disable Services sudo systemctl disable snapd.service sudo systemctl disable snapd.socket sudo systemctl disable snapd.seeded.service # Remove Snaps sudo snap remove firefox sudo snap remove snap-store sudo snap remove gtk-common-themes sudo snap remove gnome-3-38-2004 sudo snap remove snapd-desktop-integration sudo snap remove bare sudo snap remove snap sudo snap remove core20 # Purge sudo rm -rf /var/cache/snapd/ sudo apt autoremove -y --purge snapd rm -rf ~/snap # Prevent Reinstall cat etc/apt/preferences.d/nosnap.pref | sudo tee /etc/apt/preferences.d/nosnap.pref else echo "Skipping removing snapd" fi