1

When I try to yum remove texlive it lists all the packages it will remove as dependencies 'only to texlive', but for example gcc is listed. But I want to leave it in the system. Can I somehow specify packages to leave? I tried the hint from Yum autoremove removing packages that are standalone of yum install gcc to 'fix it as user-installed', but this works only when the package is installed as standalone BEFORE it is installed as a dependency.

Does anyone has a solution to this?

1

On a dnf-managed system, run dnf mark install gcc as root to mark gcc as user-installed. Run dnf mark remove gcc as root to mark gcc as installed merely to satisfy other packages’ dependencies.

On a yum-managed system, run yumdb set reason user gcc as root to mark gcc as user-installed. Run yumdb set reason dep gcc as root to mark gcc as installed merely to satisfy other packages’ dependencies.

(Giving credit where credit is due, I learned the yum answer from David Haller’s answer to an equivalent question on Server Fault and a blog post by Christopher Smart, both of which led me to the yumdb man page discussion of the reason key. For dnf, Havner’s comment in a RedHat Bugzilla bug report led me to the dnf man page discussion of dnf mark.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.