March 31, 2026

How to Delete Old (Inactive) Patches in Oracle 19c Using OPatch

How I Clean Up Old (Inactive) Patches in Oracle Using OPatch

If you have been consistently installing RUs on your Oracle Database, one of the things that will occur to you after some time is your Oracle Home being crammed with outdated patches.

They're not active anymore, but they're still lingering.

I ran into the same situation recently while checking one of our 19c environments. There were multiple old RUs lying around, and I thought it’s a good time to clean things up a bit.

Here’s how I usually handle deleting inactive patches using OPatch.

 

First, Check Your OPatch Version

Before doing anything, I always make sure OPatch is up to date. Some of these utilities won’t even work properly on older versions.

cd D:\oracle\product\19.3.0\dbhome_1\OPatch
opatch version

Make sure it’s 12.2.0.1.37 or higher.
(In my case, it was 12.2.0.1.45, so good to go.)

 

Check What’s Actually Inactive

Next step is to see what patches are inactive. This command is quite handy:

D:\oracle\product\19.3.0\dbhome_1\OPatch>opatch util listorderedinactivepatches

Oracle Interim Patch Installer version 12.2.0.1.45

Copyright (c) 2025, Oracle Corporation.  All rights reserved.

 

 

Oracle Home       : D:\oracle\product\19.3.0\dbhome_1

Central Inventory : C:\Program Files\Oracle\Inventory

   from           :

OPatch version    : 12.2.0.1.45

OUI version       : 12.2.0.7.0

Log file location : D:\oracle\product\19.3.0\dbhome_1\cfgtoollogs\opatch\opatch2025-09-05_09-50-10AM_1.log

 

Invoking utility "listorderedinactivepatches"

List Inactive patches option provided

 

The oracle home has the following inactive patch(es) and their respective overlay patches:

 

The number of RU chains is  1

 

***** There are 2 inactive RU patches in chain 1

-Inactive RU/BP 35046439:Windows Database Bundle Patch : 19.19.0.0.230418 (35046439), installed on: Fri Jul 28 10:22:30 GST 2023, with no overlays

-Inactive RU/BP 36521936:Windows Database Bundle Patch : 19.24.0.0.240716 (36521936), installed on: Thu Oct 24 11:31:40 GST 2024, with no overlays

-Active RU/BP 37486199:Windows Database Bundle Patch : 19.26.0.0.250121 (37486199), installed on: Sat May 17 10:22:50 GST 2025, with no overlays

 

OPatch succeeded.

 

There are 2 inactive RU patches in chain 1

-Inactive RU/BP 35046439: 19.19.0.0.230418
-Inactive RU/BP 36521936: 19.24.0.0.240716
-Active   RU/BP 37486199: 19.26.0.0.250121

So clearly:

  • 2 old patches are inactive
  • 1 is the current active RU

Pretty typical scenario after a couple of patch cycles.

 

Important Thing I Almost Missed Once

Now here’s something you should not ignore.

Oracle recommends keeping at least 2 inactive patches in the Oracle Home.

Why?
Because if something goes wrong and you need to rollback or investigate, having older patches helps.

So don’t just go and delete everything blindly.

 

Cleaning Up the Old Ones

To remove inactive patches, I use:

D:\oracle\product\19.3.0\dbhome_1\OPatch>opatch util deleteinactivepatches

Oracle Interim Patch Installer version 12.2.0.1.45

Copyright (c) 2025, Oracle Corporation.  All rights reserved.

 

 

Oracle Home       : D:\oracle\product\19.3.0\dbhome_1

Central Inventory : C:\Program Files\Oracle\Inventory

   from           :

OPatch version    : 12.2.0.1.45

OUI version       : 12.2.0.7.0

Log file location : D:\oracle\product\19.3.0\dbhome_1\cfgtoollogs\opatch\opatch2025-09-05_09-50-50AM_1.log

 

Invoking utility "deleteinactivepatches"

Inactive Patches Cleanup option provided

Delete Inactive Patches .......

 

***** There are 2 inactive RU patches in chain 1

 

***** 1 inactive patches will be deleted

-To be deleted inactive RU/BP 35046439:Windows Database Bundle Patch : 19.19.0.0.230418 (35046439), installed on: Fri Jul 28 10:22:30 GST 2023, with no overlays

-To be retained inactive RU/BP 36521936:Windows Database Bundle Patch : 19.24.0.0.240716 (36521936), installed on: Thu Oct 24 11:31:40 GST 2024, with no overlays

-Active RU/BP 37486199:Windows Database Bundle Patch : 19.26.0.0.250121 (37486199), installed on: Sat May 17 10:22:50 GST 2025, with no overlays

 

Do you want to proceed? [y|n]

y

User Responded with: Y

Deleted RU/BP patch: 35046439

 

OPatch succeeded.

 

Notice something interesting here — even though there were 2 inactive patches, OPatch decided to delete only 1.

That’s because it automatically ensures the minimum required patches are retained.

I just confirmed with:

y

And that’s it:

Deleted RU/BP patch: 35046439

OPatch succeeded.

 

A Couple of Things I Always Keep in Mind

From experience, a few small precautions go a long way:

  • I prefer doing this during a maintenance window (just to be safe)
  • If it’s a critical system, I take a quick backup of Oracle Home
  • Always check logs if something looks off:

%ORACLE_HOME%\cfgtoollogs\opatch

 

Final Thoughts

This is one of those small maintenance activities that’s easy to ignore, but it helps keep your environment clean.

Inactive patches don’t harm directly, but over time they just add clutter and confusion  especially when you’re troubleshooting or auditing patch levels.

 


No comments:

Post a Comment

How to Delete Old (Inactive) Patches in Oracle 19c Using OPatch

How I Clean Up Old (Inactive) Patches in Oracle Using OPatch If you have been consistently installing RUs on your Oracle Database, one of ...