When i try to uninstall openssl i get this error:

Error: Trying to remove "yum", wich is protected

I use the

    yum remove openssl

Command

how do i uninstall openssl then?

Also after i installed it i had to configure some stuff in /etc/pki/CA
I think that i might have installed the wrong kind of openssl. So how do i remove this kind?

Dani AI

Generated

Quick answer: don’t try to remove the vendor OpenSSL. Yum is protecting core pieces of the OS from being removed because lots of base tools depend on libcrypto/libssl (including yum itself). That is the “protected_packages” behavior you are seeing. (man7.org)

If you want to understand the blast radius first, simulate an erase and list dependents without touching the system:

sudo rpm -e --test openssl
sudo rpm -q --whatrequires openssl | sort -u

The first command shows what would break; the second lists packages that require OpenSSL. Yum will not remove a package without also removing everything that depends on it, and forcing removals with rpm’s “--nodeps” is explicitly warned against because it can leave the system unusable. (docs.redhat.com)

About your /etc/pki/CA changes: on RHEL/CentOS systems the stock OpenSSL config points its sample CA workspace at /etc/pki/CA by design, so creating files there does not mean you installed the “wrong kind” of OpenSSL. It just means you started setting up a local CA. (git.centos.org)

If you only need to “reset” things, prefer repairing rather than removing:

sudo yum reinstall openssl openssl-libs ca-certificates

That restores packaged bits without ripping out dependencies. If you created a test CA in /etc/pki/CA and want a clean slate, move your CA content aside (keep the directories) and re-create only what you actually need. (man7.org)

Finally, if (as hinted) you need a different OpenSSL for one app, don’t replace the system one. Build or install an alternate OpenSSL under a separate prefix (for example, /opt/openssl-1.1.x) and point just that application at it. Using both --prefix and --openssldir avoids clobbering the distro’s copy and keeps yum happy. (wiki.openssl.org)

Recommended Answers

All 2 Replies

You need to run yum as root, or with sudo (assuming you have sudo privileges). Since you are using yum, I assume you are either running a Red Hat or SuSe distribution? The openssl package is a standard module in the "security" distribution. FWIW, WHY do you want to remove openssl? It is a dependency for many other packages, so removing it could seriously impact your system.

If you are using SuSE, try using yast from the root user, as in:
yast sw_install
When you try to uninstall openssl, this will give a much clearer picture of what you are trying to do. Since the programs that depend on openssl are multitudinous, you will have to declare that you are willing to 'break' many programs. Once you have uninstalled openssl and exited yast, re-enter yast and install openssl from a SuSE repository. This should fix all the broken applications that depend on openssl.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.