ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Delete Version

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

Deletes the specified version from the input enterprise, workgroup, or desktop geodatabase.

Usage

  • Only the version's owner can delete 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 geodatabase.

  • Versioning tools only work with enterprise, workgroup, and desktop geodatabase data. Personal and file geodatabases do not support versioning.

Syntax

arcpy.management.DeleteVersion(in_workspace, version_name)
ParameterExplanationData Type
in_workspace

Specifies 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

Specifies the name of the version to be deleted.

String

Derived Output

NameExplanationData Type
out_workspace

The updated input workspace.

Workspace

Code sample

DeleteVersion example (stand-alone script)

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

# 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

  • Current Workspace

Licensing information

  • Basic: No
  • Standard: Yes
  • Advanced: Yes

Related topics

  • An overview of the Versions toolset
  • An overview of traditional versioning
  • The version editing process
  • A quick tour of reviewing conflicts
  • What is a version?
  • Version scenarios

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal