PDA

View Full Version : How can I cleanly uninstall openssl1.01e



AndiMzD
09-Sep-2013, 12:57
Hello,
My server has SLES11, SP3.
That operating system comes with openssl 0.98 installed.

Since I had a problem with stunnel (and still have) and had wanted to ask for support with the stunnel developers.
Since on their page it said that support would only be given for the current version I thought I had to update stunnel and thus openssl1.01e.
So I downloaded openssl1.01e to /var and installed it from there by using the linux rule of three (configure, make, install).
The path where it would install to was pre-configured and I left it at that.
I was lucky that the path where openssl1.01e installed itself to was not in the path variable, so it didn't take.
Now, however, I would like to reverse the installation.
The config-file for the installation was

/var/openssl-1.0.1e/INSTALL
and by it I could see that openssl1.01e had installed to the path

/usr/local/ssl/bin.
Here I found the new binary openssl of openssl1.01e.
I guess that all folders in
/usr/local/ssl
belong to the new installation of openssl1.01e.

When I cange directory on the commandline into the path
/usr/local/ssl/bin
and dispatch the command

openssl version
it returns

OpenSSL 0.9.8j-fips 07 Jan 2009
So in the system the old version of openssl still takes since only the path to the old version is contained in the path variable.

If I explicitly dispatch the same command for the current directory, then the command and the result look like this:

./openssl version
OpenSSL 1.0.1e 11 Feb 2013
My question:
How can I undo the installation, so it cleanly rolls back all entries that were done by the installtion?
Is there an uninstall command or a way to undo the installation so no traces are left behind?
The newer version of openssl (in /usr/local/ssl), which is openssl1.01e should be removed.
How can I safely go about it?

Then in /var I still have the installation directory from where I installed.
Can this just be deleted?

Thank you for tips.
Openssl forks into too many sub packages and somebody told my I would jeopardize the system by installing it and uninstalling the original version that came with the operating system.

Regards

jmozdzen
09-Sep-2013, 15:16
Hi AndiMzD,

> How can I undo the installation, so it cleanly rolls back all entries that were done by the installtion?

you've hit the major difference between a plain "untar, configure, compile, install" approach and running RPM ;) (RPM is adding another layer on-top of the UCCI approach, collecting information on which files to install where and dependencies, keeping track of the actual installation locations and offering mechanisms for controlled install/uninstall).

I see two ways to recover: 1. re-run the "install" stage, and capture where files are put - you then can remove those files. Depending on the makefile, you may even be able to avoid actually installing files, via parameters to the actual installation command. Other makefiles will just copy the files and have explicit rules per target, but my guess is that openssl is a well-designed package...

The second approach would be to "find" (via that command) all files updated during the respective time frame of installation, probably just below /usr/local, and manually sort out if those files belong to the openssl package or not.

If everything went *only* below /usr/local/ssl, you can safely remove that, as well as your "stage" in /var.

> Openssl forks into too many sub packages and somebody told my I would jeopardize the system by installing it and uninstalling the original version that came with the operating system.

I agree that messing with this on a SLES server is a bad idea - the packages there contain plenty of back-ports, despite the version number...

Regards,
Jens