Oracle: Manually clean up .patch_storage
after running `opatch util cleanup', you can do more cleanup:
--- begin quote ---
Additionally, further cleanup of the $ORACLE_HOME/.patch_storage is possible if there are directories from patches applied to previous versions. This can be done manually as follows:
1. run command:
$ opatch lsinventory
2. Remove all the sub-directories from $ORACLE_HOME/.patch_storage that are not present in the list of installed patches. Directory names would be prefaced with the patchid for example:
13343438_<timestamp>
eg:
>$ORACLE_HOME/OPatch/opatch lsinventory > lsinventorytxt.txt
oracle-psfststdb602.tmw.com::/usr/opt/app/oracle/product/19.3.0/.patch_storage>ls -lrt
total 144
drwxr-xr-x. 3 oracle dba 74 Apr 18 2019 29517242_Apr_17_2019_23_27_10
drwxr-xr-x. 3 oracle dba 74 Apr 18 2019 29585399_Apr_9_2019_19_12_47
drwxr-xr-x. 4 oracle dba 87 Jun 8 2021 32545013_Apr_16_2021_07_40_05
drwxr-xr-x. 4 oracle dba 87 Jul 31 2021 32904851_Jul_20_2021_09_21_24
drwxr-xr-x. 4 oracle dba 87 Jul 31 2021 32876380_Jul_5_2021_04_53_50
-rw-r--r--. 1 oracle dba 9001 Jan 21 07:54 newdirs.txt
drwxr-xr-x. 4 oracle dba 87 Jan 21 07:54 33515361_Jan_13_2022_06_14_07
drwxr-xr-x. 11 oracle dba 267 Jan 21 08:01 NApply
-rw-r--r--. 1 oracle dba 65094 Jan 21 08:01 record_inventory.txt
-rw-r--r--. 1 oracle dba 65506 Jan 21 08:01 interim_inventory.txt
-rw-r--r--. 1 oracle dba 92 Jan 21 08:01 LatestOPatchSession.properties
drwxr-xr-x. 4 oracle dba 87 Jan 21 08:02 33561310_Jan_5_2022_08_13_10
Nothing came back for this one to remove directory:
>grep 29517242 lsinventorytxt.txt
oracle-psfststdb602.tmw.com:fstest:/usr/opt/app/oracle/orahome>rm -rf /usr/opt/app/oracle/product/19.3.0/.patch_storage/29517242_Apr_17_2019_23_27_10
But this one is still required by oracle so keep it
oracle-psfststdb602.tmw.com:fstest:/usr/opt/app/oracle/orahome>grep 29585399 lsinventorytxt.txt
Patch 29585399 : applied on Thu Apr 18 02:21:33 CDT 2019
Patch description: "OCW RELEASE UPDATE 19.3.0.0.0 (29585399)"
Comments
Post a Comment