--- title: "Delete Key Value Pair" url: https://docs.catalyst.zoho.com/en/sdk/python/v1/cloud-scale/cache/delete-key-value-pair/ description: "This page describes the method to delete a key-value pair using a key or cache object in your Python application with sample code snippets." last_updated: 2025-03-28T12:54:49Z service: Cloud Scale type: general related_links: - name: "Cache Help" url: /en/cloud-scale/help/cache/introduction - name: "SDK Scopes" url: /en/sdk/python/v1/sdk-scopes --- # Delete a Key-Value Pair If a key-value pair is no longer needed, it can be permanently deleted from the cache segment. The key-value pair cannot be restored once it is deleted. To know more about the [component instance](https://docs.catalyst.zoho.com/en/sdk/python/v1/cloud-scale/cache/get-component-instance/)`component_service` and the [segment instance](en/sdk/python/v1/cloud-scale/cache/get-segment-instance/) `segment_service` used below, please refer to their respective help sections. ### Delete using a Key You can delete a key-value pair by passing the key name directly as a parameter to the `delete()` method. **Parameters Used**
| Parameter Name | Data Type | Definition |
|---|---|---|
| key | String | A **Mandatory** parameter. Will hold the key name of the cache segment. |