I want to free up the disk space on my Linux machine. I've drill down the space usage and found that the following directories have a big size

/u01/app/11.2.0/grid/log/diag/tnslsnr/r1n1/listener_scan2/alert (Contains xml files)
/u01/app/11.2.0/grid/rdbms/audit(Contains .aud files)
/home/oracle/oradiag_oracle/diag/clients/user_oracle/host_XXXXXXXXXX/alert(Contains xml files)
/u01/app/oracle/diag/rdbms/crimesys/crimesys1/alert (Contains xml files)

Can I delete contents from these directories? Note: I mean contents and not directories.

  • I suggest you research what each directory contains, what is creating files there and how that should best be regulated (by direct delete or other means). Was that that intention of your question? Commented Mar 28, 2012 at 13:38
  • @LeighRiffel I just wanted to free up the space and thought that these files were junks. I've already deleted files from /u01/app/11.2.0/grid/cv/log. These files are generating every 5 minutes. To stop generation of them you should write SRVM_TRACE="false" at the top of the script $ORA_CRS_HOME/bin/cluvfy for me it is /u01/app/11.2.0/grid/bin/cluvfy(line 25) The solution of this was found on metalink.
    – kupa
    Commented Mar 28, 2012 at 15:21

2 Answers 2


You can change the default retention policy of oracle log and trace files.

Source: https://streetkiter.wordpress.com/2011/04/06/do-you-really-need-one-year-old-logs-and-traces-for-your-oracle-database/

Relevant extract:
There are two parameters: SHORTP_POLICY (default 720 hours) and LONGP_POLICY (default 8720 hours). so SHORTP_POLICY is 30 days while LONGP_POLICY is 365 days.

From the commandline run "adrci". In adrci, use the following commands.

adrci> show homes
....(homes are listed)...
adrci> set home diag/....(the location)
adrci> show control
.... (current settings are listed) ....
adrci> set control (SHORTP_POLICY = 168)
adrci> set control (LONGP_POLICY = 720)

And now the traces are dropped after one week (SHORTP) or one month (LONGP).


Almost all files can be safely deleted manually. Usually it is better to keep:

alert_+ASM1.log (or the one related to your instance)
listener.xml (or the one related to your listener)

Beside these there some notes:

  • Oracle alert.log is normally set to growth to infinite.
  • Alert xml files are automatically rotated so you can keep online the last one
  • All cdump, udump and other incident and trace files are unusel unless you need to debug a problem
  • In 11gR2 there are some bugs related to the infinite growth of rbal trace file and there is no patch for the moment

Oracle also suggest you to use adrci command to purge old logs. You can run adrci and execute the following command

purge -age 60 -type ALERT

This will purge only XML logfiles marked as alert. So trace.xml logs. Adrci does not work with text files: they must be managed manually. This is an expected behaviour. Moreover various bugs have been reported about adrci purge feature. I still prefer to remove them manually through a shell script keeping online online last recent files. For alert.log I just do:

zip alert.log (your log name may differ)
> alert.log
  • 3
    So, they created a product, that will gradually fill up your hard drive, causing your system to hang, and don't mention this in big red letters on the cover of their manual? Great... Oracle FTW
    – Wouter
    Commented May 20, 2016 at 10:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.