On Ubuntu 22.04 Firefox is a snap package which is slow to open. Here is how to install Firefox and remove the snap package.
Download Firefox from Mozilla.
$ cd Downloads
$ tar xjf firefox-100.0.tar.bz2
$ sudo mkdir /opt
$ sudo mv firefox /opt/firefox100
$ sudo mv /usr/bin/firefox /usr/bin/firefox-snap
$ sudo ln -s /opt/firefox100/firefox /usr/bin/firefox
Now the Launcher on the Desktop will open the Firefox in /opt and not the snap package. Notice the difference in time of opening.
Firefox snap package is still present and we have renamed it as firefox-snap which can be run by typing
$ firefox-snap
You can remove firefox snap package
$ sudo snap remove --purge firefox
But this will remove the Firefox Launcher from the Desktop. To create a new Launcher
Open the File Manager and go to /usr/share/applications
Right Click on firefox.desktop and select Copy
Right Click on Desktop and click paste.
Right click on the Launcher click on Properties/Permissions
Put check mark on Allow executing file as a program.
Again right click on the Launcher and select Allow Launching.
If you want to remove snap completely remove the other installed snap packages one by one
$ 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
Now only snapd remains to confirm
$ snap list
Finally remove snapd
$ sudo snap remove --purge snapd
To prevent installation of snapd and other snap packages
create a config file
$ sudo gedit /etc/apt/preferences.d/nosnap.pref
Paste the following:
# To prevent repository packages from triggering the installation of snap,
# this file forbids snapd from being installed by APT.Package: snapd
Pin: release a=*
Pin-Priority: -10
Save and refresh package cache
$ sudo apt update
No comments:
Post a Comment