Delete Mosaic Dataset (Data Management)

Summary

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

Usage

  • This tool is used to delete a mosaic dataset in its entirety, including any of the tables within the database and, optionally, any overviews or caches created with it.

  • You may not want to delete the overviews or cache when these are used in other mosaic datasets. The cache is usually created when LAS data, LAS datasets, or terrains are used in the mosaic dataset.

Parameters

LabelExplanationData Type
Mosaic Dataset

The mosaic dataset that you want to delete.

Mosaic Layer
Delete Overview Images
(Optional)

Deletes all overviews associated with the mosaic dataset.

  • Checked—Delete the overviews associated with the mosaic dataset. This is the default.
  • Unchecked—Do not delete the overviews.

Boolean
Delete Item Cache
(Optional)

Delete the item cache associated with the mosaic dataset.

  • Checked—Delete the item cache associated with the mosaic dataset. This is the default.
  • Unchecked—Do not delete the item cache.

Boolean

Derived Output

LabelExplanationData Type
Delete Succeeded

Returns whether the tool succeeded.

Boolean

arcpy.management.DeleteMosaicDataset(in_mosaic_dataset, {delete_overview_images}, {delete_item_cache})
NameExplanationData Type
in_mosaic_dataset

The mosaic dataset that you want to delete.

Mosaic Layer
delete_overview_images
(Optional)

Delete all overviews associated with the mosaic dataset.

  • DELETE_OVERVIEW_IMAGESDelete the overviews associated with the mosaic dataset. This is the default.
  • NO_DELETE_OVERVIEW_IMAGESDo not delete the overviews.
Boolean
delete_item_cache
(Optional)

Delete the item cache associated with the mosaic dataset.

  • DELETE_ITEM_CACHEDelete the item cache associated with the mosaic dataset. This is the default.
  • NO_DELETE_ITEM_CACHEDo not delete the item cache.
Boolean

Derived Output

NameExplanationData Type
out_results

Returns whether the tool succeeded.

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

This tool does not use any geoprocessing environments.