In this article we are going to see how to cleanup inactive patches in oracle database.
1. List down the Inactive Patches:
Prior to deletion, ensure that inactive patches are correctly identified to confirm they can be safely removed.cd $ORACLE_HOME/OPatch ./opatch util listorderedinactivepatches
This command displays a list of all active and inactive patches.
2. Backup the '.patch_storage' directory:
Note: Always backup the '.patch_storage' directory before any cleanup.
cd /mnt/backup/ zip -R patchstorage.zip $ORACLE_HOME/.patch_storage
3. Delete Inactive Patches:
You can now safely proceed to delete the inactive patches.
cd $ORACLE_HOME/OPatch ./opatch util deleteinactivepatches
With the above command, you can delete inactive patches that are no longer required for rollback.
4. Clean-up OPatch Directory:
cd $ORACLE_HOME/OPatch ./opatch util cleanup
This process helps remove unnecessary temporary files and optimizes disk utilization.
