

# What happens when you delete an ontology

After you delete an ontology, the following changes take effect:
+  `GetOntology` returns `ResourceNotFoundException` for the ontology’s ID.
+  `ListOntologies` doesn’t return the ontology.
+  AWS Context never reuses the ontology’s ID.
+ No connection mapping changes, because `DeleteOntology` refuses an ontology that a connection mapping uses.
+ An Agent Context that you associated the ontology with for grounding keeps the ontology’s loaded schema and its grounding links.
+ An induction that the ontology was published from stays in your account. For more information, see [Deleting an ontology that came from an induction](ontology-delete.md#ontology-delete-induced).

 AWS CloudTrail records the deletion as a `DeleteOntology` event. The event includes the ontology ID in `requestParameters` and the ontology ARN in `resources`. CloudTrail also records `CreateOntology`, `GetOntology`, and `UpdateOntology` calls. To find who deleted an ontology and when, search your CloudTrail event history for `DeleteOntology` events. For more information, see [Logging AWS Context API calls using AWS CloudTrail](logging-using-cloudtrail.md).

## Next steps
<a name="ontology-after-delete-next"></a>

After you delete an ontology, you can do the following:
+ Create a replacement ontology. For more information, see [Bring your own ontology](ontology-byo.md) or [Induce an ontology from documents](ontology-induce.md).
+ Ground AWS Glue Data Catalog tables in the replacement ontology. For more information, see [Grounding structured data in an ontology](ontology-structured-grounding.md).