I have grown dependent upon the awesome add-in called Clear Geoprocessing History.
It does not appear to work with my upgrade to 10.2.2
Does someone know of a different route?
Or perhaps how to modify the tool to make it work?
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It only takes a minute to sign up.
Sign up to join this communityI have grown dependent upon the awesome add-in called Clear Geoprocessing History.
It does not appear to work with my upgrade to 10.2.2
Does someone know of a different route?
Or perhaps how to modify the tool to make it work?
If you're familiar with Python, here's a script provided in an ESRI Technical Article that automates the process of deleting geoprocessing history.
GIS administrators and managers sometimes need to delete geoprocessing history from a feature class' metadata. Instructions provided describe how to do this using a Python script.
The following Python script automates the process of deleting the geoprocessing history for all feature classes stored inside and outside feature datasets within an ArcSDE geodatabase.
There's a comment on the bottom of the article which states:
For 10.2 users, simply update the remove_gp_history_xslt from "...\Desktop10.1\..." to "...\Desktop10.2\..."
Modify the below parameters from the script according to the environment:
sdeconn
remove_gp_history_xslt
out_xml
#Import arcpy module
import arcpy, os, string
def RemoveGpHistory_fd(sdeconn,remove_gp_history_xslt,out_xml):
arcpy.ClearWorkspaceCache_management()
for fd in arcpy.ListDatasets():
arcpy.env.workspace = sdeconn + os.sep + fd
for fc in arcpy.ListFeatureClasses():
name_xml = out_xml + os.sep + str(fc) + ".xml"
#Process: XSLT Transformation
arcpy.XSLTransform_conversion(sdeconn + os.sep + fd + os.sep + fc, remove_gp_history_xslt, name_xml, "")
print "Completed xml coversion on {0} {1}".format(fd,fc)
# Process: Metadata Importer
arcpy.MetadataImporter_conversion(name_xml,sdeconn + os.sep + fd + os.sep + fc)
print "Imported XML on {0}".format(fc)
def RemoveGpHistory_fc(sdeconn,remove_gp_history_xslt,out_xml):
arcpy.ClearWorkspaceCache_management()
arcpy.env.workspace = sdeconn
for fx in arcpy.ListFeatureClasses():
name_xml = out_xml + os.sep + str(fx) + ".xml"
#Process: XSLT Transformation
arcpy.XSLTransform_conversion(sdeconn + os.sep + fx, remove_gp_history_xslt, name_xml, "")
print "Completed xml coversion on {0}".format(fx)
# Process: Metadata Importer
arcpy.MetadataImporter_conversion(name_xml,sdeconn + os.sep + fx)
print "Imported XML on {0}".format(fx)
if __name__== "__main__":
# Local variables:
sdeconn = "Database Connections\\CHILD_SAFARI_SQL.sde"
arcpy.env.workspace = sdeconn
remove_gp_history_xslt = "C:\\Program Files (x86)\\ArcGIS\\Desktop10.2\\Metadata\\Stylesheets\\gpTools\\remove geoprocessing history.xslt"
out_xml = "C:\\XML_out"
os.mkdir(out_xml)
RemoveGpHistory_fd(sdeconn,remove_gp_history_xslt,out_xml)
RemoveGpHistory_fc(sdeconn,remove_gp_history_xslt,out_xml)
I recently did this too. The directory where the xml log files are typically located for v10.2 are here:
C:\Users\yourusername\AppData\Roaming\ESRI\Desktop10.2\ArcToolbox\History
You should have write access here, so you may open up a windows explorer, select the xml, and delete. A simple python script could also be written to delete these files called from a windows task scheduler. Finally, you may also set the geoprocessing history to only keep for a defined window of time (Geoprocessing menu>Geoprocessing options>Keep results younger than (drop down)).
Admitting that this is not a proper answer but a just note in relation to another question in stack exchange asking the opposite of this question, if you export your feature class to in_memory and then overwrite your original feature class, it will lose its geoprocessing history for good.
The problem of this approach is that it exploits a deficiency of in_memory workspace and it may not be a permanent resolution.
I have still not found a way in ESRI to delete the geoprocessing history. My workaround is to open the shapefile in QGIS, export it to another name and bring it back into ArcGIS. Not elegant, but simple.