Delete Version (Data Management)
Deletes the specified version from the input workspace.
Only the version's owner can rename, delete, or alter the version.
A parent version cannot be deleted until all dependent child versions are deleted.
Versions are not affected by changes occurring in other versions of the database.
The ArcSDE geodatabase containing the version to be deleted. The default is to use the workspace defined in the Current Workspace environment.
The name of the version to be deleted.
The following stand-alone script demonstrates how use the DeleteVersion tool to delete a version.
# Name: DeleteVersion_Example.py # Description: Deletes a version # Author: ESRI # Import system modules import arcpy # Set local variables inWorkspace = "Database Connectionsemail@example.com" newName = "myVersion2" # Execute DeleteVersion arcpy.DeleteVersion_management(inWorkspace, newName)