Attempts to remove a license in Aria Suite Lifecycle locker component fail with:
"You can not delete the ######## license as it is associated with one or more environments."
The environment id referenced in the error message might no longer exist, so that when you attempt to navigate to it you receive the error:
"Environment with id <Uid> was not found. Go back to all environments."
Environment
Aria Suite Lifecycle 8.x
Cause
The issue can occur if there are stale entries in the 'vm_locker_reference' table which associates the license to a product that no longer exists, or which it shouldn't be associated to.
Resolution
Perform a successful inventory sync of the affected product in Aria Suite Lifecycle.