Filter environments by used vs. unused

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

  • Close this issue

Proposal

Whether due to gaps in environment creation workflows or abandoned tasks, projects can end up with several "orphaned" environments with no deployments, which are very unlikely to ever be used. It would be helpful to be able to filter by environments with no deployments in the Operate > Environments UI.

Workaround

You can create a script with the GitLab API that:

  1. Returns all the environments in a project
  2. Loops through each environment ID:
    1. Makes a call to get the environment's details
    2. Checks the response for "last_deployment": null
Edited Aug 28, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading