Bug 1246570

Summary: dnf autoremove removes packages installed with gnome software
Product: [Fedora] Fedora Reporter: Steven Goris <sg.steven13>
Component: dnfAssignee: Richard Hughes <rhughes>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 22CC: ben.r.xiao, hobbes1069, info, jsilhan, jzeleny, kalevlember, mluscon, packaging-team-maint, pnemade, rdieter, rhughes, sudhir, tim.lauridsen, vmukhame
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-07 10:37:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
dnf autoremove log none

Description Steven Goris 2015-07-24 15:07:17 UTC
Description of problem:
All packages installed with gnome software get removed upon 'dnf autoremove'.

Version-Release number of selected components:
dnf version: 1.0.1-2.fc22
gnome-software version: 3.16.4-1.fc22


Steps to Reproduce:
1. Install something using gnome software
2. Perform 'dnf autoremove'

Actual results:
'dnf autoremove' wants to delete the installed package.

Expected results:
'dnf autoremove' does not touch the installed package.

Comment 1 Steven Goris 2015-07-24 15:17:13 UTC
Sorry, it is probably a bug in dnf and not in gnome-software, but I can't change it.

Comment 2 Benjamin Xiao 2015-08-19 05:00:28 UTC
I am seeing this with regular removes as well. I installed cockpit and then tried to uninstall it via 'dnf remove' and it tried to uninstall selinux-policy and selinux-policy-targeted which I am pretty sure is pretty important.


@Steven, are you sure its a bug in dnf and not gnome-software being weird and marking packages as "autoinstalled"? I can imagine gnome-software installing packages as autoinstalled and then whenever dnf checks for packages that aren't depended on anymore, it picks out those.

Comment 3 Benjamin Xiao 2015-08-19 05:05:03 UTC
This bug should really be rated high severity. Autoremoving important system packages is a big deal.

Comment 4 Steven Goris 2015-08-21 12:58:38 UTC
No I'm not sure, it could be both. Other people were also experiencing issues with dnf autoremove in other cases but these issues should have been patched. That why I was not sure. I also realize now that it should be rated with a high severity but I can't change it anymore.

Comment 5 Richard Shaw 2015-09-17 12:48:33 UTC
I ran into a similar problem and none of it had to to do with gnome-software. I was trying to remove munin and it wanted to uninstall a bunch of packages, the perl ones I didn't mind as I only installed them with munin but it also wanted to uninstall packages I used, I even tried using -x to exclude them from the transaction but it didn't work. I finally had to use yum instead.

Comment 6 Sudhir Khanger 2015-09-17 13:17:45 UTC
Created attachment 1074463 [details]
dnf autoremove log

dnf autoremove is insisting on removing user-installed packages by itself. Please see the log.

Comment 7 Benjamin Xiao 2015-09-22 17:49:22 UTC
@Richard and @Sudhir

Did you guys happen to run a offline update by any chance? Like when you select Install pending software updates during shutdown?

That uses a similar mechanism to gnome-software to install and causes the same issues.

Comment 8 Richard Shaw 2015-09-22 17:53:44 UTC
No, I pretty much exclusively use CLI tools for updating.

Comment 9 Sudhir Khanger 2015-09-22 20:39:57 UTC
I rarely use software update applet but I might have used it to update my system a few times.

Comment 10 Rex Dieter 2015-11-19 20:16:57 UTC
I'm seeing this (or very similar badness) in f23/plasma too using it's own PackageKit clients, humorously,

$ sudo dnf autoremove

Error: The operation would result in removing the booted kernel: kernel-core-4.2.6-300.fc23.x86_64.

Comment 11 Michal Luscon 2015-12-07 10:37:08 UTC

*** This bug has been marked as a duplicate of bug 1259865 ***