Managing segments
Read time: 2 minutes
Last edited: Nov 12, 2024
Overview
This topic explains how to edit and delete segments. You can update a segment's details, update its targeting, and target segments within flags.
Update segment details
To update a segment's details:
- Navigate to the segment detail page for the segment you want to update.
- Click the gear icon to open the segment's settings page.
- Edit the Name, Description, and Tags for each segment.
- Click Save.
Update segment targeting
To update a segment's targeting:
- Navigate to the segment detail page for the segment you want to update.
- Update the segment's targeting based on the kind of segment:
- For rule-based segments, add, remove, or edit the segment's targeting rules. To learn more, read Rule-based segments.
- For list-based segments, add or remove individual targets or upload a new CSV to overwrite or merge with the existing targets. To learn more, read List-based segments.
- For synced segments, you cannot change segment targeting within LaunchDarkly. Instead, edit the segment in the source application. To learn more, read Segments synced from external tools.
Target segments in flags
To target the segment in a flag:
- Navigate to the segment detail page for the segment you want to update.
- Click the > icon to expand the "N flags targeting this segment" callout. "N" is the number of flags currently targeting this segment.
- Click Target this segment.
- In the "Target this segment with a flag rule" dialog, select the flag where you want to use the segment. Then click Target this segment.
Alternatively, you can navigate to the Flags list and add a new targeting rule directly from the flag's Targeting tab.
Delete segments
To delete a segment:
- Navigate to the segment detail page for the segment you want to update.
- Click the gear icon to open the segment's settings page.
- Click Delete this segment.
- In the "Delete segment?" dialog, click Delete.
You cannot delete a segment if one or more flags is using it.
You can also use the REST API: Delete segment