gnome software leaves dependencies installed

Bug #1552792 reported by Kev Bowring on 2016-03-03
60
This bug affects 12 people
Affects Status Importance Assigned to Milestone
GNOME Software
Invalid
High
Release Notes for Ubuntu
Undecided
Unassigned
gnome-software (Ubuntu)
Status tracked in Cosmic
Bionic
Medium
Robert Ancell
Cosmic
Medium
Robert Ancell
packagekit (Ubuntu)
Status tracked in Cosmic
Bionic
Medium
Robert Ancell
Cosmic
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.

Kev Bowring (flocculant) wrote :
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
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.

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()

Changed in ubuntu-release-notes:
status: New → Fix Released
AsciiWolf (asciiwolf) wrote :

Any progress regarding this issue?

AsciiWolf (asciiwolf) wrote :

Still the same issue in 17.10

tags: added: artful
AsciiWolf (asciiwolf) wrote :

Any news?

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.

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) on 2017-11-09
tags: added: bionic
AsciiWolf (asciiwolf) wrote :

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

Changed in gnome-software:
importance: Unknown → High
status: Unknown → Confirmed
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) on 2018-02-02
summary: - gnome software leaves dependencies installed
+ PackageKit leaves dependencies installed
description: updated
summary: - PackageKit leaves dependencies installed
+ gnome software leaves dependencies installed
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?

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."

AsciiWolf (asciiwolf) wrote :

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

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. ;-)

AsciiWolf (asciiwolf) wrote :

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

AsciiWolf (asciiwolf) wrote :

Still no progress regarging this issue?

no longer affects: aptdaemon (Ubuntu)
AsciiWolf (asciiwolf) wrote :

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

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)
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.

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

Robert Ancell (robert-ancell) wrote :

Sure, sounds like a good idea.

AsciiWolf (asciiwolf) wrote :

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

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
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
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
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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