This is a quick article to upgrade OPatch to latest release as its always recommended to use the latest version of OPatch before patching your database or grid. This would also be base reference for future posts on Applying latest Release Updates (RUs) and Release Update Revisions (RURs).
Download the latest copy of Opatch from https://updates.oracle.com/download/6880880.html, choose the release and platform based on your requirement and download the zip file. If you are confused about which Release to choose in the drop down of “Select a Release” please read the Description field and that should help you choose appropriate Release:
Once downloaded, transfer the file to the DB Server and then follow these Steps:
Step-1: Backup & Remove the current OPatch directory in Oracle_Home folder.
oracle> cd $ORACLE_HOME oracle> tar -cvzPpf OPatch_backup.tar OPatch/
The tar command will create a tarball named OPatch_backup.tar (which you can extract by using tar -xvzPpf command).
After the existing OPatch directory is backed up, remove the OPatch directory.
oracle> rm -rf OPatch/
Step-2: Move the Downloaded OPatch zip to Oracle Home
mv /tmp/p6880880_190000_Linux-x86-64.zip $ORACLE_HOME
Step 3: Unzip the Downloaded OPatch zip file
cd $ORACLE_HOME unzip p6880880_190000_Linux-x86-64
That’s it, unzipping this file would create OPatch directory and you get the new OPatch Installed.
Step-4: Check the OPatch version
oracle> opatch version OPatch Version: 18.104.22.168.24 OPatch succeeded. oracle>