geetools.Asset.delete#
- geetools.Asset.delete(recursive=False, dry_run=None)#
Remove the asset.
This method will delete an asset (any type) asset and all its potential children. by default it is not recursive and will raise an error if the container is not empty. By setting the recursive argument to True, the method will delete all the children and the container asset (including potential subfolders). To avoid deleting important assets by accident the method is set to dry_run by default.
Note
A container is an asset containing other assets, it can be a
Folderor anImageCollection.- Parameters:
recursive (bool) – If True, delete all the children and the container asset. Defaults to False.
dry_run (Optional[bool]) – If True, do not delete the asset simply pass them to the output list. Defaults to True.
- Returns:
The list of deleted assets.
- Return type:
list
Examples
asset = ee.Asset("projects/ee-geetools/assets/folder") asset.delete(recursive=True)