Clean-Up the '.patch_storage' Directory
This article demonstrates how to clean up wasted storage associated with old database patches.
oracle miscconfigurationintermediate
by OracleDba
14 views
This article demonstrates how to clean up wasted storage associated with old database patches.
1234567891011121314
$ cd $ORACLE_HOME/OPatch
$ ./opatch version
redinactivepatches
OPatch Version: 12.2.0.1.37
OPatch succeeded.
$
$ cd $ORACLE_HOME/OPatch
$ ./opatch util listorderedinactivepatches
$ cd $ORACLE_HOME/OPatch
$ ./opatch util deleteinactivepatches1
$ORACLE_HOME/OPatch/opatch util cleanup1234567891011121314151617181920212223242526272829303132333435363738394041424344
$ORACLE_HOME/OPatch/opatch lsinventory | grep -E "(^Patch.*applied)|(^Sub-patch)"
Patch 33561310 : applied on Fri Jan 28 05:21:35 GMT 2022
Patch 33515361 : applied on Fri Jan 28 05:15:00 GMT 2022
Patch 29585399 : applied on Thu Apr 18 08:21:33 BST 2019
$
cd $ORACLE_HOME/.patch_storage
$ ls -al
total 212
drwxr-xr-x. 17 oracle oinstall 4096 Mar 2 07:20 .
drwxr-xr-x. 72 oracle oinstall 4096 Mar 1 16:00 ..
drwxr-xr-x. 3 oracle oinstall 4096 Apr 18 2019 29517242_Apr_17_2019_23_27_10
drwxr-xr-x. 3 oracle oinstall 4096 Apr 18 2019 29585399_Apr_9_2019_19_12_47
drwxr-xr-x. 4 oracle oinstall 4096 Dec 11 2020 31668882_Sep_14_2020_06_32_18
drwxr-xr-x. 4 oracle oinstall 4096 Dec 11 2020 31771877_Oct_7_2020_21_34_19
drwxr-xr-x. 4 oracle oinstall 4096 Jan 25 2021 32067171_Dec_2_2020_09_24_57
drwxr-xr-x. 4 oracle oinstall 4096 Jan 25 2021 32218454_Jan_14_2021_16_24_38
drwxr-xr-x. 4 oracle oinstall 4096 Apr 27 2021 32399816_Mar_9_2021_06_16_02
drwxr-xr-x. 4 oracle oinstall 4096 Apr 27 2021 32545013_Apr_16_2021_07_40_05
drwxr-xr-x. 4 oracle oinstall 4096 Aug 2 2021 32876380_Jul_5_2021_04_53_50
drwxr-xr-x. 4 oracle oinstall 4096 Aug 2 2021 32904851_Jul_20_2021_09_21_24
drwxr-xr-x. 4 oracle oinstall 4096 Oct 26 12:50 33192694_Sep_14_2021_16_48_27
drwxr-xr-x. 4 oracle oinstall 4096 Oct 26 12:45 33192793_Oct_15_2021_07_09_52
drwxr-xr-x. 4 oracle oinstall 4096 Jan 28 05:16 33515361_Jan_13_2022_06_14_07
drwxr-xr-x. 4 oracle oinstall 4096 Jan 28 05:22 33561310_Jan_5_2022_08_13_10
-rw-r--r--. 1 oracle oinstall 65515 Jan 28 05:21 interim_inventory.txt
-rw-r--r--. 1 oracle oinstall 92 Jan 28 05:21 LatestOPatchSession.properties
drwxr-xr-x. 18 oracle oinstall 4096 Jan 28 05:21 NApply
-rw-r--r--. 1 oracle oinstall 9666 Jan 28 05:16 newdirs.txt
-rw-r--r--. 1 oracle oinstall 65103 Jan 28 05:21 record_inventory.txt
$
rm -Rf 29517242_Apr_17_2019_23_27_10
rm -Rf 31668882_Sep_14_2020_06_32_18
rm -Rf 31771877_Oct_7_2020_21_34_19
rm -Rf 32067171_Dec_2_2020_09_24_57
rm -Rf 32218454_Jan_14_2021_16_24_38
rm -Rf 32399816_Mar_9_2021_06_16_02
rm -Rf 32545013_Apr_16_2021_07_40_05
rm -Rf 32876380_Jul_5_2021_04_53_50
rm -Rf 32904851_Jul_20_2021_09_21_24
rm -Rf 33192694_Sep_14_2021_16_48_27
rm -Rf 33192793_Oct_15_2021_07_09_52Please to add comments
No comments yet. Be the first to comment!