With the release of 22.04, a very popular browser - Firefox - is now only available from Ubuntu as a snap package. Many of us prefer not to use snap for various reasons, including reportedly the snap version of Firefox seems slower than it's debian packaged version.
Well if this is you, you're in luck. You can change it. In this How-To I will describe the following steps:
Although everything in this How-To has been tested and is reversible, I suggest making a backup before following this or any other How-To.
This How-To uses only terminal commands and I used Konsole.
This How-To assumes you are working with a new installation of Kubuntu 22.04 and will not address snap packages other than the Firefox from a default installation.
Commands to enter will look like this:
command here
and the output will follow like this:
These procedures can be used for other PPAs and I will explain how to prioritize a single package rather than an entire PPA if you desire .
Step 1. Removing snapd and dependencies:
sudo apt remove --purge snapd
sudo apt autoremove
sudo apt-get remove --purge libsnapd-qt1 chromium-codecs-ffmpeg-extra
At this point, you should no longer see "loop" devices in the output of lsblk. Snapd is removed along with all packages not needed.
*Note the package libsnapd-glib1 remains installed due to dependencies with pulseaudio and others.
Step 2: Install the Mozilla Team PPA and Firefox
sudo add-apt-repository ppa:mozillateam/ppa
sudo apt update
sudo apt install -t 'o=LP-PPA-mozillateam' firefox
You now have the debian packaged version of the latest Firefox release installed.
However, a full apt upgrade will replace it with the snap version again. We prevent that in the next step.
Step 3: Set the Mozilla Team PPA to higher priority.
sudo touch /etc/apt/preferences.d/99mozillateam
sudo nano /etc/apt/preferences.d/99mozillateam
Add the following to the 99mozillateam file:
and save and exit nano. Now enter this to update apt:
sudo apt update
You now have set all packages from the Mozilla Team PPA at a higher priority than the default packages. To verify this run this command:
apt-cache policy
The output will be fairly long. Here is the first part:
and a later part:
Note the Mozilla Team PPA shows a priority of 900 while Ubuntu Main (where Firefox snap version is) is at the default of 500.
Lets look at the priority of just the Firefox package:
apt-cache policy firefox
Here, note the package has a 900 priority as well as the PPA. The *** indicates this package is installed.
Also note the priority number is listed ahead of the PPA line, but trails an individual package.
You can also use the above method to lower the priority of a PPA below the default 500 so that you can install a particular package from a PPA without installing everything from it.
At this point, Thunderbird will also come from the Mozilla Team (currently one point higher version). If you wish to avoid this, you can set only the priority for the Firefox package.
To accomplish this, simply change the contents of /etc/apt/preferences.d/99mozillateam as edited above to:
Then enter this again:
sudo apt update
Now the Mozilla Team PPA is at the default priority:
apt-cache policy
But the Firefox package is still at the higher priority:
apt-cache policy firefox
Note the difference here is the package shows 900 priority while the PPA still indicates 500.
You can add other packages from this PPA the same way, for example Thunderbird, by adding additional stanzas to /etc/apt/preferences.d/99mozillateam:
Don't forget to update apt after every edit of this file(s):
sudo apt update
The above techniques apply to any PPA or package.
Enjoy your snap free Kubuntu and Firefox!
Well if this is you, you're in luck. You can change it. In this How-To I will describe the following steps:
- Removing snapd from your system.
- Installing the Mozilla Team PPA and Firefox.
- Setting the Mozilla Team PPA above the default releases.
Although everything in this How-To has been tested and is reversible, I suggest making a backup before following this or any other How-To.
This How-To uses only terminal commands and I used Konsole.
This How-To assumes you are working with a new installation of Kubuntu 22.04 and will not address snap packages other than the Firefox from a default installation.
Commands to enter will look like this:
command here
and the output will follow like this:
Code:
here is the output of the above command
Step 1. Removing snapd and dependencies:
sudo apt remove --purge snapd
sudo apt autoremove
sudo apt-get remove --purge libsnapd-qt1 chromium-codecs-ffmpeg-extra
At this point, you should no longer see "loop" devices in the output of lsblk. Snapd is removed along with all packages not needed.
*Note the package libsnapd-glib1 remains installed due to dependencies with pulseaudio and others.
Step 2: Install the Mozilla Team PPA and Firefox
sudo add-apt-repository ppa:mozillateam/ppa
sudo apt update
sudo apt install -t 'o=LP-PPA-mozillateam' firefox
You now have the debian packaged version of the latest Firefox release installed.
However, a full apt upgrade will replace it with the snap version again. We prevent that in the next step.
Step 3: Set the Mozilla Team PPA to higher priority.
sudo touch /etc/apt/preferences.d/99mozillateam
sudo nano /etc/apt/preferences.d/99mozillateam
Add the following to the 99mozillateam file:
Code:
Package: * Pin: release o=LP-PPA-mozillateam Pin-Priority: 900
sudo apt update
You now have set all packages from the Mozilla Team PPA at a higher priority than the default packages. To verify this run this command:
apt-cache policy
The output will be fairly long. Here is the first part:
Code:
Package files: 100 /var/lib/dpkg/status release a=now 900 https://ppa.launchpadcontent.net/mozillateam/ppa/ubuntu jammy/main i386 Packages release v=22.04,o=LP-PPA-mozillateam,a=jammy,n=jammy,l=Firefox ESR and Thunderbird stable builds,c=main,b=i386 origin ppa.launchpadcontent.net 900 https://ppa.launchpadcontent.net/mozillateam/ppa/ubuntu jammy/main amd64 Packages release v=22.04,o=LP-PPA-mozillateam,a=jammy,n=jammy,l=Firefox ESR and Thunderbird stable builds,c=main,b=amd64 origin ppa.launchpadcontent.net
Code:
500 http://us.archive.ubuntu.com/ubuntu jammy/main i386 Packages release v=22.04,o=Ubuntu,a=jammy,n=jammy,l=Ubuntu,c=main,b =i386 origin us.archive.ubuntu.com 500 http://us.archive.ubuntu.com/ubuntu jammy/main amd64 Packages release v=22.04,o=Ubuntu,a=jammy,n=jammy,l=Ubuntu,c=main,b =amd64 origin us.archive.ubuntu.com Pinned packages:
Lets look at the priority of just the Firefox package:
apt-cache policy firefox
Code:
firefox: Installed: 100.0+build1-0ubuntu0.22.04.1~mt1 Candidate: 100.0+build1-0ubuntu0.22.04.1~mt1 Version table: 1:1snap1-0ubuntu2 500 500 http://us.archive.ubuntu.com/ubuntu jammy/main amd64 Packages *** 100.0+build1-0ubuntu0.22.04.1~mt1 900 900 https://ppa.launchpadcontent.net/mozillateam/ppa/ubuntu jammy/main amd64 Packages 100 /var/lib/dpkg/status
Also note the priority number is listed ahead of the PPA line, but trails an individual package.
You can also use the above method to lower the priority of a PPA below the default 500 so that you can install a particular package from a PPA without installing everything from it.
At this point, Thunderbird will also come from the Mozilla Team (currently one point higher version). If you wish to avoid this, you can set only the priority for the Firefox package.
To accomplish this, simply change the contents of /etc/apt/preferences.d/99mozillateam as edited above to:
Code:
Package: firefox Pin: release o=LP-PPA-mozillateam Pin-Priority: 900
sudo apt update
Now the Mozilla Team PPA is at the default priority:
apt-cache policy
Code:
Package files: 100 /var/lib/dpkg/status release a=now 500 https://ppa.launchpadcontent.net/mozillateam/ppa/ubuntu jammy/main i386 Packages release v=22.04,o=LP-PPA-mozillateam,a=jammy,n=jammy,l=Firefox ESR and Thunderbird stable builds,c=main,b=i386 origin ppa.launchpadcontent.net 500 https://ppa.launchpadcontent.net/mozillateam/ppa/ubuntu jammy/main amd64 Packages release v=22.04,o=LP-PPA-mozillateam,a=jammy,n=jammy,l=Firefox ESR and Thunderbird stable builds,c=main,b=amd64 origin ppa.launchpadcontent.net ~~~
apt-cache policy firefox
Code:
firefox: Installed: 100.0+build1-0ubuntu0.22.04.1~mt1 Candidate: 100.0+build1-0ubuntu0.22.04.1~mt1 Version table: 1:1snap1-0ubuntu2 500 500 http://us.archive.ubuntu.com/ubuntu jammy/main amd64 Packages *** 100.0+build1-0ubuntu0.22.04.1~mt1 900 500 https://ppa.launchpadcontent.net/mozillateam/ppa/ubuntu jammy/main amd64 Packages 100 /var/lib/dpkg/status
You can add other packages from this PPA the same way, for example Thunderbird, by adding additional stanzas to /etc/apt/preferences.d/99mozillateam:
Code:
Package: firefox Pin: release o=LP-PPA-mozillateam Pin-Priority: 900 Package: thunderbird Pin: release o=LP-PPA-mozillateam Pin-Priority: 900
sudo apt update
The above techniques apply to any PPA or package.
Enjoy your snap free Kubuntu and Firefox!
Comment