Can I safely delete the contents of the .patch_storage subdirectory in NH_ORACLE_HOME?
search cancel

Can I safely delete the contents of the .patch_storage subdirectory in NH_ORACLE_HOME?


Article ID: 35738


Updated On:


CA eHealth



I need to free up disk space on an eHealth poller. I see a lot of duplicate files in several D:\oracle\Oracle.11.2\.patch_storage directories. Is it OK to delete the oldest of these directories?


It depends. Normally, this data is used in order to be able to rollback a patch. However, if you have installed a patchset (eg., then the patches for the previous patchset ( located in the .patch_storage directory are not needed anymore and can be removed. However, we do not recommend that you delete the directories manually yourself, as this would not be supported. Instead let Oracle do it for you.

The following instructions use the variable NH_ORACLE_HOME to indicate the home path to your Oracle application directory. Note that these instructions work for both Oracle 10g and 11g.

  1. Open a command line interface and move into the OPatch subdirectory

    Windows:   cd %NH_ORACLE_HOME%/OPatch
    Sol/Lin:  cd $NH_ORACLE_HOME/OPatch

  2. Run the following command to cleanup the ./patch_storage directories.

    Windows:   opatch util Cleanup
    Sol/Lin:   ./opatch util Cleanup

  3. When prompted if you want to proceed, enter 'y' to continue.



E:\oracle\Oracle.11.2\OPatch>opatch util Cleanup

Oracle Interim Patch Installer version
Copyright (c) 2012, Oracle Corporation.  All rights reserved.

Oracle Home       : E:\oracle\ORACLE~1.2
Central Inventory : E:\Program Files\Oracle\Inventory
  from           : n/a
OPatch version    :
OUI version       :
Log file location : E:\oracle\ORACLE~1.2\cfgtoollogs\opatch\opatch2015-12-22_13-38-50PM_1.log

Invoking utility "cleanup"
OPatch will clean up ',make.txt' files and 'rac,scratch,backup' directories.
You will be still able to rollback patches after this cleanup.
Do you want to proceed? [y|n]
User Responded with: Y
Size of directory "E:\oracle\ORACLE~1.2\.patch_storage" before cleanup is 4575330012 bytes.
Size of directory "E:\oracle\ORACLE~1.2\.patch_storage" after cleanup is 188326505 bytes.

UtilSession: Backup area for restore has been cleaned up. For a complete list of files/directories deleted, Please refer log file.

OPatch succeeded.



MetaLink Note 550522.1 -- How To Avoid Disk Full Issues Because OPatch Backups Take Big Amount Of Disk Space

(This link requires user access to Oracle Support)


Release: LHDEVC99000-6.3-eHealth-Live Health Upgrade Elements