I'm working on a python script to remove Geoprocessing History at the Database, Feature Class, Table, Feature Dataset and feature classes within any feature datasets. ESRI provides this page which contains Python code to do most of it; it takes care of root level feature class gp history as well as gp history within feature datasets. I'm tinkering with the code to get any gp history for tables as well as the database itself.
The real question I have for this forum is: Does anyone know where the actual GP history is stored? You can view GP history under the Description Tab for a given feature/gdb in ArcCatalog, and the script ESRI provides, somehow uses an xlst style sheet to get rid of gp history; it's a bit of a convoluted process, and I'd rather not get into that here.
It would be cool to be able to check for gp history before actually running the script. Psuedo code might look like:
''' for a given fgdb, fc, table, fds/fc... '''
if gp_history exists:
run the ESRI_mojo
But I don't know where to look for it. I thought maybe arcpy.describe might have it, but no such luck.
There is an post from June 2018 that discusses removing gp history in ArcGIS Pro, but the metadata related tools are not available in Pro like arcpy.XSLTransform_conversion and arcpy.MetadataImporter_conversion which the ESRI script relies upon...
I've posted to the Metadata group only because I can't think of another more logical space: Curtis Price, if you see this and can think of where it ought to go, please cross post.