"No package to remove" error when attempting to uninstall

Bug #1969303 reported by frenchy82
100
This bug affects 16 people
Affects Status Importance Assigned to Milestone
GNOME Software
Fix Released
Unknown
snap-store-desktop
Fix Released
Critical
Robert Ancell
gnome-software (Ubuntu)
Fix Released
Critical
Jeremy Bícha
Jammy
Fix Released
Critical
fossfreedom

Bug Description

[Impact]

 * The Ubuntu repository version of gnome-software in 22.04 does not
   allow a user to uninstall an application.
   For new users this could be be construed as disconcerting
   allowing only installing apps without the ability to
   remove those apps later if required.

   This SRU is applicable only to the gnome-software application
   installed from the repository and not the branded
   ubuntu-store snap that is the default in Ubuntu (but not in
   flavours such as Ubuntu Budgie)

   This fix for gnome-software has been backported from the
   v41 version of ubuntu's snap-store.

   The fixed software now checks for the status of a deb package
   installed - either manually installed or automatically as
   part of a distro install. Previously this check was not done
   and gnome-software defaulted to not allowing the package to
   be uninstalled.
   The new status check allows gnome-software to evaluate that
   the package can be uninstalled.

[Test Plan]

 * Choose a package from the installed list in gnome-software.
   Click the trash icon. Note the error message that the package
   cannot be removed.
 * install gnome-software from the proposed repository. Logout and
   login.
   Repeat the trash icon click step above. This time the package
   can be removed. Confirm via either your distro menu or searching in
   GNOME Overview (if you are using gnome-software from the repository) that the
   application has been successfully removed.

 * Perform additional testing such as installing applications from the repository
   (change the source to "Ubuntu (deb)") and then deleting the application.

 * Perform additional testing such as installing applications from the snap
   repository (change the source to "Snap") and then deleting the application.

[Where problems could occur]

 * The code changed is specific to 'packagekit' repos i.e. debian based repos.
   Thus it is sensitive to possible regressions when installing & removing apps.

 * The patch itself is well tested since it was backported to the ubuntu snap-store
   several weeks ago and has been rolled out. No adverse issues has been reported.

 * The risk would be that there could be additional changes to the snap-store
   that was not incorporated in gnome-software possibly producing different
   results.

 * The additional regression tests in the Test Plan will reveal this.

[Other Info]

 * There is no need to backport this to Kinetic since a revised version
   of the patch has been upstreamed (GNOME Team) and is in the kinetic version.

----

On a fresh install of Ubuntu 22.04, ubuntu-store won't uninstall any application

If you want to uninstall a software, there is an error message : "no package to remove"

No problem to uninstall this same software with synaptic for example

Paul White (paulw2u)
tags: added: jammy
Revision history for this message
Paul White (paulw2u) wrote :

Can confirm so updating status.

Changed in snap-store-desktop:
status: New → Confirmed
summary: - no package to remove
+ "No package to remove" error when attempting to uninstall
Revision history for this message
Ken VanDine (ken-vandine) wrote :

Which type of package did you try to uninstall? Was it a snap or a deb package? Which specific package did you try?

Revision history for this message
frenchy82 (cartes) wrote :

I tried only with deb package

Totem for example.
After that i have installed celluloid and tried to uninstall it with the snap-store but I did not succeed

Revision history for this message
Paul White (paulw2u) wrote :

Using today's ISO (20220418) in a live session I tried to uninstall cheese, gedit, evince, gparted, shotwell and many others. All exhibited the reported error of "Unable to remove (packagename): no packages to remove".

Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/1969303

tags: added: iso-testing
Revision history for this message
Ken VanDine (ken-vandine) wrote :

I collected some verbose output when attempting to uninstall cheese and totem:

14:21:52:0306 Gs uninstall org.gnome.Cheese.desktop
14:21:52:0306 Gs Chaining cancellation from 0x5649a0db03a0 to 0x5649a10724e0
14:21:52:0310 Gs running remove on plugin=snap with dedupe-flags=7 with refine-flags=require-setup-action,require-origin with interactive=True with timeout=60 on apps system/package/manual:ubuntu-jammy-main/org.gnome.Cheese.desktop/*, elapsed time since creation 3ms
14:21:52:0322 Gs Disconnecting cancellable 0x5649a0db03a0

14:24:02:0360 Gs uninstall org.gnome.Totem.desktop
14:24:02:0360 Gs Chaining cancellation from 0x5649a2abf0a0 to 0x7fae98820560
14:24:02:0364 Gs running remove on plugin=snap with dedupe-flags=7 with refine-flags=require-setup-action,require-origin with interactive=True with timeout=60 on apps system/package/manual:ubuntu-jammy-main/org.gnome.Totem.desktop/*, elapsed time since creation 3ms

Revision history for this message
Ken VanDine (ken-vandine) wrote :

I've also reproduced the same issue with the gnome-software 41.5 deb in Jammy, output is slightly different:

14:26:55:0535 Gs uninstall org.gnome.Cheese.desktop
14:26:55:0535 Gs Chaining cancellation from 0x55d1dbee0fa0 to 0x55d1dc090820
14:26:55:0536 Gs running remove on plugin=packagekit with dedupe-flags=7 with refine-flags=require-setup-action,require-origin with interactive=True with timeout=60 on apps system/package/manual:ubuntu-jammy-main/org.gnome.Cheese.desktop/*, elapsed time since creation 1ms
14:26:55:0538 Gs Disconnecting cancellable 0x55d1dbee0fa0

Changed in gnome-software (Ubuntu):
status: New → Confirmed
Revision history for this message
Ken VanDine (ken-vandine) wrote :
Benjamin Drung (bdrung)
description: updated
Changed in gnome-software (Ubuntu):
milestone: none → ubuntu-22.04.1
tags: added: rls-jj-incoming
Revision history for this message
Raquel Montanana Grau (lusciousblue) wrote :

Sorry I changed the status involuntarely. Please roll back

Changed in snap-store-desktop:
status: Confirmed → Fix Released
Changed in snap-store-desktop:
status: Fix Released → Confirmed
Revision history for this message
Robert Ancell (robert-ancell) wrote :
Changed in gnome-software (Ubuntu):
importance: Undecided → Critical
assignee: nobody → Robert Ancell (robert-ancell)
assignee: Robert Ancell (robert-ancell) → nobody
assignee: nobody → Jeremy Bicha (jbicha)
Changed in snap-store-desktop:
importance: Undecided → Critical
Changed in gnome-software (Ubuntu):
status: Confirmed → Triaged
Changed in snap-store-desktop:
status: Confirmed → Triaged
Changed in snap-store-desktop:
assignee: nobody → Robert Ancell (robert-ancell)
status: Triaged → Fix Committed
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Pushed this change into the snap-store and snap-store-41 branches.

Revision history for this message
Raquel Montanana Grau (lusciousblue) wrote :

Thanks! I understand we will see the snap-store being updated in the stable branch soon automatically, won't we?

Can you please confirm as well if the gnome-software .deb package fix will be made available as a stable update for 22.04?

Revision history for this message
Robert Ancell (robert-ancell) wrote :

The snap-store beta channel currently contains the change and that will roll out to the stable channel soon (assuming no issues found).

The fix will go into Debian for gnome-software (we are in sync with Debian for this), and that will be copied over to Ubuntu 22.04.

Jeremy Bícha (jbicha)
Changed in gnome-software (Ubuntu Jammy):
status: New → Triaged
importance: Undecided → Critical
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-software - 42.1-1

---------------
gnome-software (42.1-1) unstable; urgency=medium

  * New upstream release
  * Cherry-pick proposed patch to fix inability to remove apps (LP: #1969303)
  * debian/gnome-software-common.install: Install usr/share/swcatalog
    instead of usr/share/app-info

 -- Jeremy Bicha <email address hidden> Sun, 01 May 2022 12:16:07 -0400

Changed in gnome-software (Ubuntu):
status: Triaged → Fix Released
Changed in snap-store-desktop:
status: Fix Committed → Fix Released
Changed in gnome-software:
status: Unknown → Fix Released
Changed in gnome-software (Ubuntu Jammy):
assignee: nobody → fossfreedom (fossfreedom)
Revision history for this message
fossfreedom (fossfreedom) wrote :

ok - I have taken the commit from the snap-store-41 branch and applied it - it works locally here.

I've pinged on IRC ubuntu-desktop how best to proceed with the SRU for jammy

description: updated
Changed in gnome-software (Ubuntu Jammy):
status: Triaged → In Progress
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Please test proposed package

Hello frenchy82, or anyone else affected,

Accepted gnome-software into jammy-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gnome-software/41.5-2ubuntu2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-jammy to verification-done-jammy. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-jammy. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in gnome-software (Ubuntu Jammy):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-jammy
Revision history for this message
Robert Spencer (rspencer01) wrote (last edit ):

Test run:

 * With old version (41.5), under "install" tab attempted to uninstall package "0ad"
 * Error message "no package to remove" given
 * Ran `which 0ad` which exited with return code 0

 * Installed proposed package (41.5-2ubuntu2)
 * Rebooted machine

 * Under "install" tab attempted to uninstall package "0ad"
 * Prompted for confirmation and password
 * Application removed from list of installed packages
 * `which 0ad` exits with error code 1 (command non-existent or not executable)
 * `apt list 0ad` not showing `[installed]` or `[auto]` or `[manual]`.

 * Install application "2048" (source deb)
 * Removed application "2048"

 * Attempt to locate a package with a snap source **failed**
 * Attempt to remove package with a snap source **failed** (no packages listed with snap sources, including some I know I installed previously).

 * Downgraded gnome-software and gnome-software-common to 41.5-2

 * Attempt to locate a package with a snap source **failed**
 * Attempt to remove package with a snap source **failed** (no packages listed with snap sources, including some I know I installed previously).

Unfortunately, I did not check if I could uninstall snaps before doing the upgrade. However, there are snaps installed that I must have done through gnome-software, that I can now no longer see or remove.

As such, I cannot in good faith tag this verification-done-jammy. However, the bug mentioned is passed so I'm not sure if I should label it verification-failed-jammy.

I'd suggest future testers check explicitly that they can see, install and remove snap packages before and after the upgrade, and wouldn't mind if someone verifies this for me.

Revision history for this message
fossfreedom (fossfreedom) wrote :

Further to Roberts observations:

I've done a clean Ubuntu Budgie install and fully up-to-date.

Confirmed I saw the error reported here when uninstalling a .deb.

Confirmed that snap installation and snap removal works as expected without any error reported.

Upgraded from the proposed repo version 41.5-2ubuntu2

sudo apt install gnome-software gnome-software-common gnome-software-plugin-snap

logged out and logged in.

Retested snap installation and snap removal - as before works expected without any error reported.

Retested .deb install and deb removal - no error reported when uninstalling and the app was successfully removed.

Thus I'm happy to verify this bug report.

Robert - I would raise a separate issue for your snap removal issue - please though do test on a clean install and verify as I have above

tags: added: verification-done verification-done-jammy
removed: verification-needed verification-needed-jammy
Revision history for this message
Robert Spencer (rspencer01) wrote :

My apologies, @fossfreedom. I forgot to upgrade/downgrade the snap-plugin package and didn't notice it being removed.

I've repeated the test in the above comment, including package `gnome-software-plugin-snap` and all tests now passed. Unfortunately I don't have access to a clean install to test, but it works on the dirty install so I won't open a new issue.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-software - 41.5-2ubuntu2

---------------
gnome-software (41.5-2ubuntu2) jammy; urgency=medium

  * Bug-fix release
    Use manual & auto install statuses to allow a deb package to be
    uninstalled (LP: #1969303)
    02_check_to_use_manual_auto_statuses.patch
  * Packaging changes
    d/control update maintainers

 -- David Mohammed <email address hidden> Wed, 20 Jul 2022 13:59:04 +0100

Changed in gnome-software (Ubuntu Jammy):
status: Fix Committed → Fix Released
Revision history for this message
Łukasz Zemczak (sil2100) wrote : Update Released

The verification of the Stable Release Update for gnome-software has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Aslan Gencer (aslan-gencer) wrote :

I have the "Handbrake" (ghb) version 1.2.1 installed. The version information is from the about menu of the application.
"Ubuntu Software" application shows "Handbrake" installed and reports its version as 1.5.1+ds1 which is incorrect. This is happening possibly because my Ubuntu installation is an upgrade from previous version(s).

I am unable to remove "Handbrake" via the "Ubuntu Software" application. It shows "Unable to remove Handbrake: no packages to remove" when the red thrash bin icon (remove) is clicked on.

The output of "apt list ghb" is empty and "sudo apt remove ghb" returns "E: Unable to locate package ghb"

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.