Openssl upgrade

Hello Admins.

I need to upgrade the openssl version in Solaris 10 due to vulnerabilities. When I checked the current version, it shows:

bash-3.2# openssl version
OpenSSL 1.0.2n  7 Dec 2017
bash-3.2# which openssl
/usr/bin/openssl

When I installed the new one, its getting installed under /usr/local instead of /usr/bin

bash-3.2# /usr/local/ssl/bin/openssl version
OpenSSL 1.0.2o  27 Mar 2018

How can I get rid of the older version?

Thanks in advance.