Delete Mosaic Dataset (Data Management)

License Level:BasicStandardAdvanced

Summary

Removes a mosaic dataset, its overviews, and its item cache from disk.

Usage

Syntax

DeleteMosaicDataset_management (in_mosaic_dataset, {delete_overview_images}, {delete_item_cache})
ParameterExplanationData Type
in_mosaic_dataset

The mosaic dataset that you want to delete from the geodatabase.

Mosaic Dataset ; Mosaic Layer
delete_overview_images
(Optional)

Choose whether to delete the overviews that are associated with the mosaic dataset.

  • DELETE_OVERVIEW_IMAGESThe overviews associated with the mosaic dataset will be deleted. This is the default.
  • NO_DELETE_OVERVIEW_IMAGESThe overviews will not be deleted.
Boolean
delete_item_cache
(Optional)

Choose whether to delete the raster item cache that is associated with the mosaic dataset.

  • DELETE_ITEM_CACHEThe cache associated with the mosaic dataset will be deleted. This is the default.
  • NO_DELETE_ITEM_CACHEThe cache will not be deleted.
Boolean

Code Sample

DeleteMosaicDataset example 1 (Python window)

This is a Python sample for the DeleteMosaicDataset tool.

import arcpy
arcpy.DeleteMosaicDataset_management(
     "C:/Workspace/fileGDB.gdb/md2delete",
     "DELETE_OVERVIEW_IMAGES", "NO_DELETE_ITEM_CACHE")
DeleteMosaicDataset example 2 (stand-alone script)

This is a Python script sample for the DeleteMosaicDataset tool.

#Delete mosaic dataset including the overview images

import arcpy
arcpy.env.workspace = "C:/Workspace"

mosaicds = "fileGDB.gdb/md2delete"
delOvr = "DELETE_OVERVIEW_IMAGES"
delCache = "NO_DELETE_ITEM_CACHE"

    
arcpy.DeleteMosaicDataset_management(mosaicds, delOvr, delCache)

Environments

Licensing Information

ArcGIS for Desktop Basic: No
ArcGIS for Desktop Standard: Yes
ArcGIS for Desktop Advanced: Yes
11/18/2013