Pages

Tuesday, May 10, 2022

Remove snap packages including Firefox on Ubuntu 22.04, install gnome-software, add Flatpak repo and install Firefox Flatpak version.

Ubuntu 22.04 comes with Ubuntu-Software which is snap store and Firefox comes as a snap package. If you don't like this set up you can remove all installed snap packages including Firefox and install gnome-software with flatpak plugin, add flatpak repo and install Firefox Flatpak version.

$ 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 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

$ sudo apt install gnome-software
$ sudo apt remove --purge gnome-software-plugin-snap
$ sudo apt install gnome-software-plugin-flatpak
$ flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

Restart

Open gnome-software and install Firefox

Monday, May 09, 2022

Remove Firefox snap package on Ubuntu 22.04 and install non snap Firefox also remove snap completely.

 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