After R12 Installation, $ORACLE_HOME/.patch_storage consumes more space.

After R12 installation we find the RDBMS patching backup area ($ORACLE_HOME/.patch_storage) takes more than 5 GB space.This will increase backup time and requires more backup space.

Please Note: From OPatch Version 10.2 Opatch does not backup only the affected modules, it also takes a backup of the complete affected libraries to $ORACLE_HOME/.patch_storage//backup// for faster rollback. This causes the .patch_storage directory to grow accordingly to the size of the libraries and modules being patched.

Therefore, after every R12 installation, we should clean up this area. 

For this we need to follow the below steps:

1. Login as Database OS User

2. Set the Path
$ export PATH
$ which opatch
$ opatch lsinventory -invPtrLoc $ORACLE_HOME/oraInst.loc

3. Check the size of .patch_storage
$ du -sh $ORACLE_HOME/.patch_storage

4. Run opatch cleaning
$ opatch util cleanup -help
$ opatch util cleanup -invPtrLoc $ORACLE_HOME/oraInst.loc

5. Now check the .patch_storage size
$ du -sh $ORACLE_HOME/.patch_storage