Delete Version (Data Management)

License Level:BasicStandardAdvanced

Summary

The Delete Version tool deletes the specified version from the input enterprise, workgroup, or desktop geodatabase.

Usage

Syntax

DeleteVersion_management (in_workspace, version_name)
ParameterExplanationData Type
in_workspace

Provide the database connection file to the enterprise, workgroup, or desktop geodatabase containing the version to be deleted. The default is to use the workspace defined in the Current Workspace environment.

Workspace
version_name

Specify the name of the version to be deleted.

String

Code Sample

DeleteVersion example (stand-alone script)

The following stand-alone script demonstrates how use the DeleteVersion tool to delete a version.

# Name: DeleteVersion_Example.py
# Description: Deletes a version

# Import system modules
import arcpy

# Set local variables
inWorkspace = "c:/Connections/whistler@gdb.sde"
versionName = "myVersion2"

# Execute DeleteVersion
arcpy.DeleteVersion_management(inWorkspace, versionName)

Environments

Related Topics

Licensing Information

ArcGIS for Desktop Basic: No
ArcGIS for Desktop Standard: Yes
ArcGIS for Desktop Advanced: Yes
5/7/2015