Mark rpm package as automatically installed

At least newer yum versions (tested on Fedora 20 with yum 3.4.3) are able to distinguish between manually-installed packages and packages installed as dependencies. This information is stored in yumdb using the key "reason" which can be either set to "user" or "dep".

# yumdb set reason dep [package name or wildcard]

should be the equivalent to "aptitude markauto". If you do not provide a package name, the change is applied to all packages. I wouldn't do that, the less radical way is to use

# yumdb search reason user

and manually remove the packages you don't want.

If you run

# yum autoremove

all packages marked as "dep" are removed if they are no longer referenced by other packages. Should be equivalent to "aptitude autoremove".

Packages installed not using yum (e.g rpm -i) might not have the "reason" key, I assume the default behavior of autoremove is to treat them as "user" packages, but they are not listed using the "yumdb search" command.

Tags:

Rpm

Repository