Delete inactive patches from Oracle Home
Starting from version 12.2.0.1.37 (April 2023), OPatch automatically cleans up inactive patches, addressing the issue of increasing patch_storage size due to old patches being retained.
Step 1: Check the version of Opatch
cd $ORACLE_HOME/OPatch
opatch version
Step 2: List the inactive patches using the following command
opatch util listorderedinactivepatches
Step 3: Delete the inactive patch
Note: We keep only the latest inactive patch with this command, allowing one patch to remain so the current patch can be rolled back.
opatch util deleteinactivepatches
One another command:
Note: This will clear some space, but it often doesn’t remove all the patches that can be taken out.
opatch util cleanup