Install Thunderbird deb-package on Ubuntu
The process:
- Uninstall the Thunderbird snap
- Uninstall the Thunderbird DEB wrapper
- Add the Mozilla Team PPA2
- Set PPA priority (prevents the snap wrapper being installed)
- Install Thunderbird DEB
- Prevent Unattended Upgrades from reinstalling the snap
Step 1 & 2: You only need to do this if the Thunderbird snap is installed.
> sudo snap remove --purge thunderbird && sudo apt remove thunderbird
Step 3: add the Mozilla Team PPA to your list of Software Sources:
> sudo add-apt-repository ppa:mozillateam/ppa
Step 4: Now for the complicated bit!
You need to set the PPA priority higher than the the Ubuntu repos. This is because Ubuntu is configured as such to assume the the snap wrapper version is newer than the one in the PPA you’ve added.
Any text editor (including command-line ones like vim or nano) can be used to do this step. I’m going to use GNOME Text Editor:
> sudo vi /etc/apt/preferences.d/mozillateamppa
Add:
Package: thunderbird* Pin: release o=LP-PPA-mozillateam Pin-Priority: 1001 Package: thunderbird* Pin: release o=Ubuntu Pin-Priority: -1
The top 3 lines tell your system to give priority to the thundebird DEB in the Mozilla Team PPA. The bottom 3 lines tell you system to avoid installing the thunderbird DEB in the Ubuntu repositories (which will reinstall the snap).
Step 5: update your package lists and install Thunderbird from the Mozilla Team PPA:
> sudo apt update && sudo apt install thunderbird
Step 6: Do you have unattended upgrades enabled (i.e., Ubuntu automatically checks for, downloads, and installs updates on your system from the Ubuntu repos)? If so, the Thunderbird snap may magically reappear.
This is because (like pinning) Ubuntu assumes its own DEB/snap wrapper is the newest version, irrespective of whether it is, and irrespective of your pin priority. You can disable/turn off unattended upgrades to avoid reinstalling the snap.
Alternatively, run this command (don’t replace ‘distro_codename’). It tells your system to not auto-upgrade Thunderbird package from its the Ubuntu repo, but only the Mozilla Team PPA: –
> echo 'Unattended-Upgrade::Allowed-Origins:: "LP-PPA-mozillateam:${distro_codename}";' | sudo tee /etc/apt/apt.conf.d/51unattended-upgrades-thunderbird