Ask Your Question
2

How do I prevent dnf autoremove from removing specific packages?

asked 2015-05-30 16:04:47 -0600

sensaurav gravatar image

I have listed a package with the installonlypkgs option in /etc/dnf/dnf.conf. I have also listed that package with the exclude option because I do not want that package to be auto-upgraded. In particular, I have: -

exclude=xorg-x11-drv-intel
installonlypkgs=xorg-x11-drv-intel

Running dnf upgrade does not offer to upgrade the package, which is as expected and as desired. However, running dnf autoremove lists the package for removal and asks for confirmation. The man page for dnf.conf, installonlypkgs option says, "These packages are never removed by dnf autoremove even if they were installed as dependencies." The man page for dnf, autoremove command corroborates this: "Packages listed in installonlypkgs are never automatically removed by this command." So, how do I prevent dnf autoremove from removing specific packages, if not through installonlypkgs?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-12-10 09:29:52 -0600

rjmco gravatar image

Have you tried

dnf mark install xorg-x11-drv-intel

This will mark the packages as having been installed by the user and prevent it from being removed by autoremove.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-05-30 16:04:47 -0600

Seen: 1,575 times

Last updated: May 30 '15