Resolution
Remove any releases or runbook snapshots you can find that still use the library variable set, then try the delete again. If it still fails, contact Octopus Support. The remaining reference is stored in a way you can't remove from the Octopus Web Portal, and Support can help you clear it safely.
Symptom
You try to delete a library variable set, and Octopus shows this error even though the variable set's Usage tab is empty:
The variable set can't be deleted because it's currently being referenced in a release or runbook snapshot. Please refer to usages for more detail.
Scope: when this is the right article
This article applies when a library variable set can't be deleted and its Usage tab shows no usages. Accounts and certificates can show the same behavior. For accounts, see This account cannot be deleted when the Usage tab is empty.
Cause
Releases and runbook snapshots keep a copy of the variable sets they use. Octopus won't delete a variable set while any snapshot still refers to it. Some of those references aren't listed on the Usage tab, so the tab can be empty while the delete is still blocked.
A known cause is a bug that could leave orphaned variable set snapshots behind, Orphaned variable set snapshots prevent deletion (GitHub issue #9330). It's fixed in 2025.4.7021 and all 2026.1 and later releases. Upgrading stops new orphaned snapshots being created, but it doesn't remove ones created before the upgrade.
Diagnosis and fix
- If you're on a self-hosted version earlier than 2025.4.7021, upgrade first, so the problem doesn't come back after you clear it.
- In each project that used the variable set, look for old releases and runbook snapshots that were created while the project still included it. Delete the ones you no longer need from the project in the Octopus Web Portal. Deleting a release also removes its deployment history, so note the release numbers and projects first.
- Try to delete the variable set again.
- If the delete still fails, contact Octopus Support. Include:
- The variable set's name and ID, for example
LibraryVariableSets-123. - Your Octopus Server version, and whether you use Octopus Cloud or self-host Octopus Server.
- The exact error message.
- Which releases and runbook snapshots you've already deleted.
Don't edit the Octopus database directly to remove the reference. Changing the database by hand is unsupported and can leave your instance in an inconsistent state.
Verify
Delete the library variable set again. The delete succeeds, and the variable set no longer appears under Library > Variable Sets.