0

I am trying to delete an asset in Earth Engine using the Java API. When I try to delete the asset, I get the error message:

Before trying to delete an asset, delete its children: projects/earthengine-legacy/assets/users/[...]

The problem is that the children asset seems to be the same asset, with a different path (projects/earthengine-legacy/assets)!

As an example, I try to delete users/myName/assetAAA, and EE wants me to delete projects/earthengine-legacy/assets/users/myName/assetAAA, which seems exactly the same? I even tried to use the function ee.data.deleteAsset(), specifying the full path, as in ee.data.deleteAsset("projects/earthengine-legacy/assets/users/myName/assetAAA") and still get the same error, that I should delete the asset itself.

What can I do to avoid this problem? What is exactly an asset child?

Illustration:

enter image description here

enter image description here

1 Answer 1

5

The problem was that the asset I was trying to delete is an ImageCollection! To delete it, one needs first to delete each image individually before deleting the ImageCollection.

To do so in the Java GUI:

  1. Click on the asset details
  2. Go to Images, delete each image (trash icon)
  3. Then use the Delete button

Alternatively, if one uses the earthengine command line, one needs to pass the recursive argument to rm:

earthengine rm --recursive collection_id

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.