Why run Ubuntu if feel so strongly about snap? There are so many other distros that don’t use it.
I recently switched to Debian to get away from Ubuntu CONSTANTLY forcing the Firefox snap over the Deb I purposefully installed. It's fine but I keep running into little things like the kernel being too old for my GPU, missing codecs for Zoom, etc. It's a little irritating in that regard. I guess I could have picked Mint but it still had an older kernel so even then it wouldn't have been trouble free.
I would still be on Ubuntu if it just respected Firefox being a Deb. I tried many guides and times to get it to not use the snap and nothing worked on 24.04 so I gave up. I wouldn't even care if the snap version at least operated the same as the deb version.
install_firefox() {
source /etc/os-release
printf "Package: snapd
Pin: release a=\*
Pin-Priority: -10" | sudo tee -a /etc/apt/preferences.d/nosnap.pref
sudo add-apt-repository -y ppa:mozillateam/ppa
sudo apt update -y
sudo apt install -y -t 'o=LP-PPA-mozillateam' firefox
printf "%s" "Unattended-Upgrade::Allowed-Origins:: \"LP-PPA-mozillateam:${UBUNTU_CODENAME}\";" | sudo tee /etc/apt/apt.conf.d/51unattended-upgrades-firefox
printf "Package: firefox\*
Pin: release o=LP-PPA-mozillateam
Pin-Priority: 501" | sudo tee /etc/apt/preferences.d/mozillateamppa
}
remove_snaps() {
sudo snap remove --purge firefox
sudo snap remove --purge snap-store
sudo snap remove --purge gnome-3-38-2004
sudo snap remove --purge gtk-common-themes
sudo snap remove --purge snapd-desktop-integration
sudo snap remove --purge bare
sudo snap remove --purge core20
sudo snap remove --purge snapd
sudo apt remove --autoremove snapd -y
cat <<EOF | sudo tee /etc/apt/preferences.d/nosnap.pref
# To prevent repository packages from triggering the installation of Snap,
# this file forbids snapd from being installed by APT.
# For more information: https://linuxmint-user-guide.readthedocs.io/en/latest/snap.html
Package: snapd
Pin: release a=*
Pin-Priority: -10
EOF
sudo umount /var/snap
}