Delete (Data Management)

License Level:BasicStandardAdvanced


Permanently deletes data from disk. All types of geographic data supported by ArcGIS, as well as toolboxes and workspaces (folders, geodatabases), can be deleted. If the specified item is a workspace, all contained items are also deleted.



Delete_management (in_data, {data_type})
ParameterExplanationData Type

The input data to be deleted.

Data Element; Graph; Layer; Table View

Data type of the Input Data Element. Data type is displayed for informative purposes and cannot be changed.


Code Sample

Delete Example (Python Window)

The following Python Window script demonstrates how to use the Delete function in immediate mode.

import arcpy
from arcpy import env

env.workspace = "C:/data"
arcpy.Copy_management(("majorrds.shp"), "majorrdsCopy.shp")
Delete Example 2 (Stand-alone Python Script)

The following Python script demonstrates how to use the Delete function in a stand-alone script.

# Name:
# Description: Delete majorrdsCopy.shp 

# Import system modules
import arcpy
from arcpy import env

# Set workspace
ENV.workspace = "C:/data"

# Set local variables
in_data0 =  "majorrds.shp"
out_data =  "majorrdscopy.shp"
data_type = ""

# Execute Copy
arcpy.Copy_management(in_data, out_data, data_type)

# Execute Delete
arcpy.Delete_management(out_data, data_type)


This tool does not use any geoprocessing environments

Related Topics

Licensing Information

ArcGIS for Desktop Basic: Yes
ArcGIS for Desktop Standard: Yes
ArcGIS for Desktop Advanced: Yes