> ## Documentation Index
> Fetch the complete documentation index at: https://launchdarkly.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Archiving context kinds

<View title="Developer" />

<View title="Federal docs" />

<View title="EU docs" />

This topic explains how to archive and restore archived context kinds.

## Archive context kinds

Archiving a context kind makes it unavailable for flag and segment targeting and unavailable for use in experiments.

To archive a context kind:

1. Navigate to the **Contexts** list.
2. Click the **gear** icon on the right. The context kinds list appears.
3. Click the three-dot**overflow menu** icon next to the context kind you want to archive. The "Edit context kind" dialog appears.
4. Click **Archive**.

The context kind is now hidden from the contexts kinds list and is not available in flag and segment targeting rules.

### Archive the user context kind

If you need to, you can archive the user context kind. The process for doing so is slightly different than archiving other context kinds.

1. In the left sidebar, click **Code**. The CodeControl menu appears.
2. Click **Contexts**.
3. Click the **gear** icon on the right. The context kinds list appears.
4. Click the **three-dot** overflow menu icon next to the user context kind. The "Edit context kind" dialog appears.
5. Deselect the "Available for experiments and guarded rollouts" checkbox.
6. Click **Save**.
7. Return to the "Edit context kind" dialog for the user context kind. The "Archive" option is now enabled.

## Restore archived context kinds

To restore an archived context kind:

1. In the left sidebar, click **Code**. The CodeControl menu appears.
2. Click **Contexts**.
3. Click the **gear** icon on the right. The context kinds list appears.
4. Check the **Show archived context kinds** checkbox at the top of the context kinds list.
5. Click the **three-dot** overflow menu icon next to the context kind you want to restore. The "Edit context kind" dialog appears.
6. Click **Restore**.

The context kind displays on the context kinds list and is available for targeting.

<Card icon="https://mintcdn.com/launchdarkly/YIC2H8XW-fomhquw/assets/icons/openapi-logo.svg?fit=max&auto=format&n=YIC2H8XW-fomhquw&q=85&s=dd9578a9668a86e1a8b8c314921f204c" horizontal width="2500" height="2452" data-path="assets/icons/openapi-logo.svg">
  You can also use the REST API: [Create or update context kind](/docs/api/contexts/create-or-update-context-kind)
</Card>
