gnome software leaves dependencies installed

Bug #1552792 reported by Kev Bowring
64
This bug affects 12 people
Affects Status Importance Assigned to Milestone
GNOME Software
Invalid
High
Release Notes for Ubuntu
Fix Released
Undecided
Unassigned
gnome-software (Ubuntu)
Fix Released
Medium
Robert Ancell
Bionic
Fix Released
Medium
Robert Ancell
Cosmic
Fix Released
Medium
Robert Ancell
packagekit (Ubuntu)
Fix Released
Medium
Robert Ancell
Bionic
Fix Released
Medium
Robert Ancell
Cosmic
Fix Released
Medium
Robert Ancell

Bug Description

[Impact]
Installing an application them removing it leaves dependencies behind.

[Test Case]
1. Ensure that GNOME Sudoku is not installed:
$ sudo apt remove gnome-sudoku libqqwing2v5
2. Check if you have any packages that need autoremoval:
$ sudo apt autoremove --no-act
3. Open GNOME Software.
4. Search for and install GNOME Sudoku (make sure to install the .deb, not the snap).
5. Uninstall GNOME Sudoku.
6. Check if you have any packages that need autoremoval:
$ sudo apt autoremove --no-act

Expected result:
The packages in step 6 are the same as in step 2 (which might be none).

Observed result:
The packages in step 6 includes libqqwing2v5, which is a dependency of gnome-sudoku and not useful without the game installed.

[Regression Potential]
This requires a fix to PackageKit which used to autoremove all packages (too aggressive), not just the ones related to the current transaction. A bug in the code could cause more packages to be removed than is suitable. GNOME Software previously didn't use this autoremove functionality, so by enabling it we could trigger a problem in either the existing code or the new fix.

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

Does USC do an autoremove afterwards or does it explicitly remove dependencies?

Changed in gnome-software (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Kev Bowring (flocculant) wrote :

to be honest - I have no idea what USC actually does.

Given that the dependencies aren't there to autoremove I would assume that it does do that.

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

Michael Vogt confirmed that USC automatically removed unused dependencies. We should do the same.

See aptdaemon/worker/aptworker.py:711 _check_obsoleted_dependencies()

Mathew Hodson (mhodson)
Changed in ubuntu-release-notes:
status: New → Fix Released
Revision history for this message
AsciiWolf (asciiwolf) wrote :

Any progress regarding this issue?

Revision history for this message
AsciiWolf (asciiwolf) wrote :

Still the same issue in 17.10

tags: added: artful
Revision history for this message
AsciiWolf (asciiwolf) wrote :

Any news?

Revision history for this message
AsciiWolf (asciiwolf) wrote :

This issue is there since Ubuntu 16.04. There is not any user-friendly (for regular users) way to remove the dependencies. It is a problem since many applications depend on other applications, parts of other desktop environments etc. and removing the applications leave users with many unwanted applications/packages they are not able to remove. Please, fix this issue.

Revision history for this message
AsciiWolf (asciiwolf) wrote :

For example uninstalling Steam is a problem because of this issue: https://bugs.launchpad.net/hundredpapercuts/+bug/1564570/comments/18

AsciiWolf (asciiwolf)
tags: added: bionic
Revision history for this message
AsciiWolf (asciiwolf) wrote :

I really hope that this bug will be finally fixed in Ubuntu 18.04.

Revision history for this message
AsciiWolf (asciiwolf) wrote :
Changed in gnome-software:
importance: Unknown → High
status: Unknown → Confirmed
Revision history for this message
AsciiWolf (asciiwolf) wrote :

I have created a separate bug report for the Steam issue: https://bugs.launchpad.net/ubuntu/+source/steam/+bug/1741047

Changed in gnome-software:
status: Confirmed → Invalid
AsciiWolf (asciiwolf)
summary: - gnome software leaves dependencies installed
+ PackageKit leaves dependencies installed
description: updated
summary: - PackageKit leaves dependencies installed
+ gnome software leaves dependencies installed
Revision history for this message
AsciiWolf (asciiwolf) wrote :
Revision history for this message
AsciiWolf (asciiwolf) wrote :

The aptcc PackageKit backend developer told me that autoremove is already supported for more than 5 years, since this commit from 2012: https://github.com/hughsie/PackageKit/commit/94a5e71ded685720e49f17dc6ee21716b33ac177

But it still does not work when using pkcon or GNOME Software. Maybe it is not enabled by default?

Revision history for this message
AsciiWolf (asciiwolf) wrote :

More information from Julian Klode (https://github.com/hughsie/PackageKit/issues/201#issuecomment-364363222):

"Sure, it's an option given to backends, see pk_backend_remove_packages() - it's a parameter in the Dbus API's RemovePackages() method. In the client API, you can specify it as a boolean parameter for pk_client_remove_packages_async.

But it's not the kind of autoremove that would be correct for gnome-software - gnome-software needs to remove "new garbage", that is only packages that become unused as a result of the removal and not any other unrelated garbage that has accumulated over time."

Revision history for this message
AsciiWolf (asciiwolf) wrote :

It would be great if the correct autoremove method could be implemented in PackageKit or GNOME Software.

Revision history for this message
AsciiWolf (asciiwolf) wrote :

As I wrote in the github PackageKit bug report: I offer 1 ETH (currently ~852 USD) to anyone who manages to implement (and gets upstreamed) a working autoremove support for packages that are uninstalled using GNOME Software on Ubuntu/Debian. ;-)

Revision history for this message
AsciiWolf (asciiwolf) wrote :

I don't have the ETH anymore, but I will send $600 via PayPal to the one who fixes this issue.

Revision history for this message
AsciiWolf (asciiwolf) wrote :

Still no progress regarging this issue?

no longer affects: aptdaemon (Ubuntu)
Revision history for this message
AsciiWolf (asciiwolf) wrote :
Revision history for this message
AsciiWolf (asciiwolf) wrote :

VLC is another package where uninstallation is problematic: https://bugs.launchpad.net/ubuntu/+source/gnome-software/+bug/1746728

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

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in packagekit (Ubuntu):
status: New → Confirmed
Changed in packagekit (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → Medium
Changed in gnome-software (Ubuntu):
assignee: nobody → Robert Ancell (robert-ancell)
Changed in packagekit (Ubuntu):
assignee: nobody → Robert Ancell (robert-ancell)
Changed in gnome-software (Ubuntu Bionic):
status: New → Triaged
Changed in packagekit (Ubuntu Bionic):
status: New → Triaged
importance: Undecided → Medium
Changed in gnome-software (Ubuntu Bionic):
importance: Undecided → Medium
assignee: nobody → Robert Ancell (robert-ancell)
Changed in packagekit (Ubuntu Bionic):
assignee: nobody → Robert Ancell (robert-ancell)
Revision history for this message
Robert Ancell (robert-ancell) wrote :

It looks like the PackageKit change will be accepted upstream - this stops the autoremove functionality to only remove dependencies of packages being removed. This matches the old aptd behaviour.

GNOME Software will have to be distro patched however, as upstream considers this functionality not reliable - since we have limited backends on Ubuntu we can enable it however.

Revision history for this message
Daniel Nicoletti (dantti) wrote : Re: [Bug 1552792] Re: gnome software leaves dependencies installed

Cant Gnome software add a define as a build option like I do in Apper?

Em qua, 23 de mai de 2018 às 20:54, Robert Ancell <
<email address hidden>> escreveu:

> It looks like the PackageKit change will be accepted upstream - this
> stops the autoremove functionality to only remove dependencies of
> packages being removed. This matches the old aptd behaviour.
>
> GNOME Software will have to be distro patched however, as upstream
> considers this functionality not reliable - since we have limited
> backends on Ubuntu we can enable it however.
>
> --
> You received this bug notification because you are subscribed to
> packagekit in Ubuntu.
> https://bugs.launchpad.net/bugs/1552792
>
> Title:
> gnome software leaves dependencies installed
>
> Status in GNOME Software:
> Invalid
> Status in Release Notes for Ubuntu:
> Fix Released
> Status in gnome-software package in Ubuntu:
> Triaged
> Status in packagekit package in Ubuntu:
> Triaged
> Status in gnome-software source package in Bionic:
> Triaged
> Status in packagekit source package in Bionic:
> Triaged
> Status in gnome-software source package in Cosmic:
> Triaged
> Status in packagekit source package in Cosmic:
> Triaged
>
> Bug description:
> Using gnome software (or another PackageKit or aptdaemon based UI) to
> install an application - removal of that package leaves behind
> dependencies
>
> Installing an application with ubuntu software centre only leaves
> behind config files (seen in synaptic labelled for complete removal).
>
> After installing and then removing alarm clock with USC -
>
> sudo apt-get autoremove
> [sudo] password for wolf:
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> 0 to upgrade, 0 to newly install, 0 to remove and 1 not to upgrade.
>
> After cleaning up and then reinstalling with gnome software, followed
> by the removal
>
> sudo apt-get autoremove
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> The following packages will be REMOVED
> libappindicator1 libindicator7
> 0 to upgrade, 0 to newly install, 2 to remove and 1 not to upgrade.
> After this operation, 184 kB disk space will be freed.
>
> ProblemType: Bug
> DistroRelease: Ubuntu 16.04
> Package: gnome-software 3.19.92~git20160303.26a927d-0ubuntu1
> ProcVersionSignature: Ubuntu 4.4.0-10.25-generic 4.4.3
> Uname: Linux 4.4.0-10-generic x86_64
> ApportVersion: 2.20-0ubuntu3
> Architecture: amd64
> CurrentDesktop: XFCE
> Date: Thu Mar 3 16:23:45 2016
> InstallationDate: Installed on 2015-10-29 (126 days ago)
> InstallationMedia: Xubuntu 16.04 LTS "Xenial Xerus" - Alpha amd64
> (20151029)
> SourcePackage: gnome-software
> UpgradeStatus: No upgrade log present (probably fresh install)
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/gnome-software/+bug/1552792/+subscriptions
>
--
Daniel Nicoletti

KDE Developer - http://dantti.wordpress.com

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

Sure, sounds like a good idea.

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

By the way, any chance these fixes will be backported to the current 18.04 LTS release?

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

The bug is marked for bionic (18.04 LTS) but we'd want it to be well tested in Cosmic first.

Changed in packagekit (Ubuntu Cosmic):
status: Triaged → Fix Committed
description: updated
Changed in gnome-software (Ubuntu Cosmic):
status: Triaged → In Progress
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package packagekit - 1.1.10-1ubuntu4

---------------
packagekit (1.1.10-1ubuntu4) cosmic; urgency=medium

  * debian/patches/aptcc-Fix-invalid-version-dereference-in-AptInf-prov.patch:
    Fix dereferencing of invalid version in providesCodec() (LP: #1790671)

 -- Julian Andres Klode <email address hidden> Tue, 04 Sep 2018 18:18:05 +0200

Changed in packagekit (Ubuntu Cosmic):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-software - 3.29.92-0ubuntu2

---------------
gnome-software (3.29.92-0ubuntu2) cosmic; urgency=medium

  * debian/rules:
    - Build with PackageKit autoremove support (LP: #1552792)
  * debian/control:
    - Depend on the version of PackageKit which correctly does autoremove

 -- Robert Ancell <email address hidden> Tue, 04 Sep 2018 11:04:47 +1200

Changed in gnome-software (Ubuntu Cosmic):
status: Fix Committed → Fix Released
Changed in packagekit (Ubuntu Bionic):
status: Triaged → Fix Committed
Changed in gnome-software (Ubuntu Bionic):
status: Triaged → Fix Committed
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Kev, or anyone else affected,

Accepted packagekit into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/packagekit/1.1.9-1ubuntu2.18.04.4 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 and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. 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.

tags: added: verification-needed verification-needed-bionic
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Kev, or anyone else affected,

Accepted gnome-software into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gnome-software/3.28.1-0ubuntu4.18.04.7 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 and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. 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.

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

I've verified this fixes the issue with the following versions:

packagekit=1.1.9-1ubuntu2.18.04.4
gnome-software=3.28.1-0ubuntu4.18.04.7

tags: added: verification-done-bionic
removed: verification-needed-bionic
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package packagekit - 1.1.9-1ubuntu2.18.04.4

---------------
packagekit (1.1.9-1ubuntu2.18.04.4) bionic; urgency=medium

  * debian/patches/0001-aptcc-Only-autoremove-packages-that-relate-to-the-cu.patch:
  * debian/patches/0002-aptcc-Use-installed-version-to-determine-garbage.patch:
    - Correct autoremove behaviour to only autoremove packages that relate to
      the current transaction (LP: #1552792)

 -- Robert Ancell <email address hidden> Fri, 09 Nov 2018 14:24:04 +1300

Changed in packagekit (Ubuntu Bionic):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for packagekit has completed successfully and the package has now been 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
Chris Halse Rogers (raof) wrote : Please test proposed package

Hello Kev, or anyone else affected,

Accepted gnome-software into bionic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/gnome-software/3.28.1-0ubuntu4.18.04.8 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 and change the tag from verification-needed-bionic to verification-done-bionic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-bionic. 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.

tags: added: verification-needed-bionic
removed: verification-done-bionic
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Confirmed still fixed in gnome-software 3.28.1-0ubuntu4.18.04.8

tags: added: verification-done-bionic
removed: verification-needed verification-needed-bionic
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-software - 3.28.1-0ubuntu4.18.04.8

---------------
gnome-software (3.28.1-0ubuntu4.18.04.8) bionic; urgency=medium

  * Re-released to generate correct .changes file

gnome-software (3.28.1-0ubuntu4.18.04.7) bionic; urgency=medium

  * debian/rules:
  * debian/patches/0001-packagekit-Add-configure-option-to-use-autoremove-fe.patch:
    - Build with PackageKit autoremove support (LP: #1552792)
  * debian/control:
  * debian/patches/0023-snap-Don-t-treat-auth-cancellation-as-an-error.patch:
    - Stop cancelling snapd authorization triggers error notification
      (LP: #1785240)

gnome-software (3.28.1-0ubuntu4.18.04.6) bionic; urgency=medium

  * debian/patches/0023-Revert-Revert-flatpak-Use-list-of-related-apps-for-i.patch:
  * debian/patches/0024-flatpak-Check-if-a-related-app-is-installed-even-whe.patch:
  * debian/patches/0025-flatpak-Include-related-refs-to-the-app-s-runtime-on.patch:
    - Disable the Flatpak changes - SRU testing showed they broke downgrades

gnome-software (3.28.1-0ubuntu4.18.04.5) bionic; urgency=medium

  * debian/patches/0023-Revert-Revert-flatpak-Use-list-of-related-apps-for-i.patch:
  * debian/patches/0024-flatpak-Check-if-a-related-app-is-installed-even-whe.patch:
  * debian/patches/0025-flatpak-Include-related-refs-to-the-app-s-runtime-on.patch:
    - Pull related flatpak refs (LP: #1754864)
  * debian/patches/0003-Sort-snaps-before-other-apps.patch:
    - Fix snap search result ordering (LP: #1798228)
  * debian/patches/0001-Set-reboot-notifications-as-urgent-to-avoid-them-tim.patch:
    - Stop reboot notification from timing out (LP: #1719797)
  * debian/patches/0001-lib-Allow-opening-CAB-files-that-resolve-more-than-o.patch:
    - Support composite CAB files (LP: #1798470)

 -- Robert Ancell <email address hidden> Wed, 21 Nov 2018 12:29:27 +1300

Changed in gnome-software (Ubuntu Bionic):
status: Fix Committed → Fix Released
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.