Skip to Main Content
  • Questions
  • How to Clean Oracle Home Directories

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Alan.

Asked: January 06, 2025 - 8:53 pm UTC

Last updated: January 16, 2025 - 7:15 am UTC

Version: Oracle 19c

Viewed 1000+ times

You Asked

Hi,

Recently while preparing to run the Release Upgrade for 19.24 I was doing a cold back of my ORACLE_HOME and I noticed that I had a ton of old .log, .trc, and .trm files. I deleted old files in the trace directory, audit directory, and some of the log directories. I also leanred that OPatch now has a nice option to clean up .patch_storage which was really full of old files that I had always been afraid to touch.

Is there an approved list of directories to periodically purge (maybe 30+ day old files) for ORACLE_HOME and the oraInventory?

Thanks,
Alan

and Connor said...

Depending on your platform you might want to take a look at this MOS note

Doc ID 2081655.1 - purgeLogs: Archive & Cleanup traces, logs in one command.

which has a tool to do this for you.,

Also, check out ADRCI which will manage stuff under the "diag" directory for you based on retention settings, eg

adrci> set control (SHORTP_POLICY = 72)
adrci> set control (LONGP_POLICY= 720)

(those values in hours)

For the stuff like old patches and the inventory, then OPatch is the tool for that, as you've already noted.

Rating

  (1 rating)

Comments

Thanks

Alan Rosenthal, January 14, 2025 - 5:28 pm UTC

Hi Connor,

Thanks! It works like a charm.

Alan
Connor McDonald
January 16, 2025 - 7:15 am UTC

glad it worked out