Public bug reported:

Hi,

I think, I discovered a problem with the deb package under Ubuntu 22.04
and 24.04

When you try removing firefox through apt or apt-get, firefox does not get 
uninstalled properly.
The snap remains installed and accessible through the application menu.

Steps to reproduce:
(0. optional: install firefox through sudo apt install firefox)
1. Use a terminal to run the command "sudo apt remove firefox"
2. Confirm that firefox snap is still installed and available through the start 
menu

What should happen:
Firefox should get removed properly when using apt.
That means either uninstalling it through the same method it was installed or 
letting the user know that further action is required.

What happens instead:
The firefox snap does not get uninstalled and the user is not informed that 
further action is required to remove firefox.

Why this is happening:
When installing firefox through apt, the package uses the "preinst" script to 
install it using the snap daemon instead. However when uninstalling the 
package, the "prerm" script is not configured to uninstall the firefox snap. 
Instead, it just removes the default symlinks for firefox.
However, the systems still falls back to the snap package because it is still 
installed through snap.

How to fix:
Put something like this in the "prerm" or "postrm"-Script of the package: "snap 
remove firefox"
If it has been left out on purpose, there should at least be a message, letting 
the user know. Something like this:
echo "In order to fully remove the package, you need to uninstall the firefox 
snap with the following command:"
echo "snap remove firefox"
Here is an entry from the debian docs on how to use maintainer scripts: 
https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html


My current Ubuntu Release:
Description:    Ubuntu 24.04 LTS
Release:        24.04
Also happens on anything newer than Ubuntu 22.04

Kind regards,
Simon

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: firefox 1:1snap1-0ubuntu5
ProcVersionSignature: Ubuntu 6.8.0-31.31-generic 6.8.1
Uname: Linux 6.8.0-31-generic x86_64
ApportVersion: 2.28.1-0ubuntu2
Architecture: amd64
CasperMD5CheckMismatches: ./boot/grub/grub.cfg
CasperMD5CheckResult: fail
CurrentDesktop: ubuntu:GNOME
Date: Sat May  4 18:22:22 2024
InstallationDate: Installed on 2024-05-04 (0 days ago)
InstallationMedia: Ubuntu 24.04 LTS "Noble Numbat" - Release amd64 (20240424)
ProcEnviron:
 LANG=de_DE.UTF-8
 PATH=(custom, no user)
 SHELL=/bin/bash
 TERM=xterm-256color
 XDG_RUNTIME_DIR=<set>
SnapChanges:
 ID   Status  Spawn                 Bereit                Zusammenfassung
 3    Done    2024-05-04T16:14:02Z  2024-05-04T16:14:22Z  Remove "firefox" snap
 4    Done    2024-05-04T16:14:36Z  2024-05-04T16:14:56Z  Install "firefox" snap
SourcePackage: firefox
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: firefox (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug noble wayland-session

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2064819

Title:
  Ubuntu: 22.04+ cannot unistall firefox through apt

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/2064819/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to