3

I performed a clean install, with manual partitioning of Xubuntu 25.04.

I've already downloaded the Firefox and Thunderbird packages from their site, unzipped them, and moved the directories to /opt.

Before creating their links and launchers, I want to remove the snap versions of these applications and anything linked to snap from the system.

How can I do this?

In fact, I want to remove all snap applications, not just Firefox, that is, Firefox, Thunderbird, Bare, Core etc.

Regarding what was suggested in:

How to remove Snap completely without losing Firefox?

sudo apt-get install firefox sudo apt-get install thunderbird produces the installation of the SNAP version.

Also, the procedure to download and install Firefox is not the traditionally recommended one, copy the firefox directory to the /opt directory, which is the one I used.

In addition, I am testing Xubuntu 25.04, and that post refers to Ubuntu 21.10, I estimate that there have been many changes in the journey, and there are references linked to Linuxmint.

1 Answers1

5

First check the installed snap applications by running in a terminal:

snap list

Before deleting them, close any applications that were running, and then delete them from the terminal with the command:

sudo snap remove paquete_snap

First remove the applications, firefox, thunderbird, then continue with gnome, gtk-themes, core, bare, etc.

Finally, remove the snapd package and all its services with the command:

sudo apt purge snapd

If the Snap cache remains, delete it with:

sudo rm -rf /var/cache/snapd

Finally, if the snap directories have not been removed from the system, you can remove them with:

rm -rf ~/snap
sudo rm -rf /snap
sudo rm -rf /var/snap
sudo rm -rf /var/lib/snapd

=============================================

To prevent future installations from bringing Snap back it's a good idea to create a file in the /etc/apt/preferences.d/ directory, called, for example, nosnap.pref.

sudo nano /etc/apt/preferences.d/nosnap.pref

With the following contents:

Package: snapd
Pin: release a=*
Pin-Priority: -10

Ctrl + O, save the file

Ctrl + X, close nano

The APT preferences file /etc/apt/preferences and the file segments within the /etc/apt/preferences.d/ directory are used to control the versions of the packages selected for installation. APT assigns a priority to each available version, and, limited by dependencies, apt-get selects the version with the highest priority. APT preferences modify the priorities that APT assigns to package versions by default, giving the user control over which version is selected for installation.

kyodake
  • 17,808