Clean the .patch_storage directory with Opatch utility in Oracle

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
This entry was posted in Oracle on by .
Unknown's avatar

About SandeepSingh

Hi, I am working in IT industry with having more than 15 year of experience, worked as an Oracle DBA with a Company and handling different databases like Oracle, SQL Server , DB2 etc Worked as a Development and Database Administrator.

Leave a Reply