---
title: removeFromParent()
framework: classkit
role: symbol
role_heading: Instance Method
path: classkit/clscontext/removefromparent()
---

# removeFromParent()

Removes the context from its parent.

## Declaration

```swift
func removeFromParent()
```

## Discussion

Discussion If you remove a context from its parent and don’t add it as the child of another context before you call save(completion:), then the framework deletes the context entirely.

## See Also

### Managing context hierarchy

- [identifierPath](classkit/clscontext/identifierpath.md)
- [parent](classkit/clscontext/parent.md)
- [addChildContext(_:)](classkit/clscontext/addchildcontext(_:).md)
- [descendant(matchingIdentifierPath:completion:)](classkit/clscontext/descendant(matchingidentifierpath:completion:).md)
