How to find and clean up unused components in Jira Cloud
Components pile up in Jira Cloud: a team is renamed, a product is retired, and the component stays in every dropdown. Jira has no screen that lists the ones with no issues. Here is how to find them with what Jira gives you, what deleting one does to its issues, and a read-only script that lists the empty ones.
Hullspark · updated 2026-10-29
Short answer
- Where to look: the Components page of the space lists each component and lets you edit or delete it from a More actions menu [1]. It is a page to read one project at a time.
- To count issues: JQL accepts
component = Nameor the component ID [2], so you can count per component by hand. - To get all empty components at once: the REST endpoint that lists a project’s components returns an
issueCountfor each one [3]. The script below filters for 0. - Before you delete: you can link the component’s work items to another component or unlink them entirely [1]. There is no archive; the request for one, JRACLOUD-10507, is still open [5].
Step 1: Open the Components page
- Open the space (project) and select Components in the space navigation. Atlassian also gives a second route: More actions (•••) next to the space name, then Space settings, then Components [1].
- The role needed to configure components is listed as Space admin or App admin [1].
- Make a list of the components whose names look retired. The page is a good place to spot them, but Atlassian’s article does not describe a column that tells you which components have no issues, so the next two steps give you the counts.
Step 2: Count a component’s issues with JQL
In the issue search, switch to JQL and search by component name or ID [2]:
project = PROJ AND component = "Payments"
project = PROJ AND component = 20500
If the result is empty, the component has no issues you can see. Two cautions. Your search only returns issues you have permission to browse. And this takes one search per component, which is slow past a dozen components. The operators =, !=, IS, IS NOT, IN and NOT IN are supported; ~ and the comparison operators are not [2].
Step 3: List every empty component with the REST API
Atlassian’s REST reference has a paginated endpoint, GET /rest/api/3/project/{projectIdOrKey}/component. It takes startAt, maxResults and orderBy, and orderBy=issueCount is a documented sort. In the published OpenAPI file each returned component has an issueCount field [3]. The older, unpaginated /components endpoint returns components without that field, and a separate endpoint, GET /rest/api/3/component/{id}/relatedIssueCounts, returns the count for one component [3].
The script only sends GET requests, so it changes nothing. Replace the placeholders with your own site, email, project key and API token (Atlassian describes API-token basic auth for REST calls [4]). Keep the token to yourself.
PowerShell
$site = "https://YOUR-SITE.atlassian.net"
$email = "you@example.com"
$token = "YOUR_API_TOKEN" # your own token; never share or commit it
$key = "PROJ" # project key, case sensitive
$pair = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes("${email}:${token}"))
$h = @{ Authorization = "Basic $pair"; Accept = "application/json" }
$start = 0
do {
$uri = "$site/rest/api/3/project/$key/component?startAt=$start&maxResults=50&orderBy=issueCount"
$page = Invoke-RestMethod -Headers $h -Uri $uri # GET only: nothing is changed
$page.values | Where-Object { $_.issueCount -eq 0 } |
Select-Object id, name, @{n="lead";e={$_.lead.displayName}}
$start += $page.values.Count
} until ($page.isLast -or $page.values.Count -eq 0)
curl and jq
curl -s -u "you@example.com:YOUR_API_TOKEN" \
-H "Accept: application/json" \
"https://YOUR-SITE.atlassian.net/rest/api/3/project/PROJ/component?maxResults=50&orderBy=issueCount" \
| jq -r '.values[] | select(.issueCount == 0) | "\(.id)\t\(.name)"'
The output is a list of component IDs and names with no issues. Check each one before you delete it: look at the lead, and ask the team whether it is kept for a seasonal report.
What deleting a component does to its issues
- In the screen: select More actions (•••) on the component’s row and choose Delete. Atlassian’s article says that if work items are linked to the component, you can link them to another component, or unlink them entirely [1]. It does not say what happens if you skip that step.
- In the API:
DELETE /rest/api/3/component/{id}takesmoveIssuesTo, the ID of the component that replaces the deleted one. If it is null, no replacement is made [3]. The permission needed is Administer projects for the project, or Administer Jira [3]. - So: an empty component can be deleted with nothing to move. For one that still has issues, pick the replacement first, or you lose the grouping on those issues.
Where the built-in tools stop
- No archive. The request for archiving components has 1,242 votes and is marked Gathering Interest [5].
- No one-screen answer. You need the API or a search per component to find the empty ones.
- Zero issues is not the whole story. A component can hold only resolved issues and still be dead, and a component with no issues may belong to a rule or a filter. Check automation rules and saved filters that name it before you delete.
- Deletes are not reviewed. Jira does not keep your reasons. Export the list to a file first, so you can recreate a component by name if someone asks.
We’re building a tool for this — get notified.
Questions
Does Jira Cloud have a way to list components with no issues?
Not as a built-in screen that I could find in Atlassian’s documentation. The vote request JRACLOUD-10507, “Archive project components”, is still open. You can get the list from the REST API, which returns an issue count for each component, or by counting with JQL one component at a time.
What happens to issues when I delete a component?
Atlassian’s help page says that if work items are linked to the component, you can link them to another component or unlink them entirely. The REST API does the same: the moveIssuesTo parameter names the component that replaces the deleted one, and with no value no replacement is made.
Who can delete a component?
In Atlassian’s help page the role is Space admin or App admin. The REST reference for deleting a component asks for the Administer projects permission on the project, or Administer Jira.
Can I archive a component instead of deleting it?
Atlassian’s API reference lists no archive field for components, and the archive request is still open. A common workaround is to rename the component, for example with a prefix, and leave it in place. That is a convention, not a Jira feature.
What I have not verified
I read the Jira claims on this page from Atlassian’s documentation and OpenAPI file on 2026-10-29. I did not run the script against a live Jira site, and Atlassian changes screens and APIs.
I did not confirm the columns of the Components page, whether issueCount includes resolved or archived issues, or what the Delete dialog says when you skip the replacement. Atlassian’s help pages for this topic are written for “spaces”; older ones say “projects”, and the menu labels may differ on your site.
Sources
- [1] Atlassian Support: Configure Jira components: https://support.atlassian.com/jira-software-cloud/docs/configure-jira-components/
- [2] Atlassian Support: JQL fields (Component): https://support.atlassian.com/jira-software-cloud/docs/jql-fields/
- [3] Atlassian developer docs: Jira Cloud REST API v3, Project components (and the published OpenAPI file, swagger-v3.v3.json): https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-components/
- [4] Atlassian developer docs: Basic auth for REST APIs: https://developer.atlassian.com/cloud/jira/platform/basic-auth-for-rest-apis/
- [5] Atlassian Jira: JRACLOUD-10507 Archive project components: https://jira.atlassian.com/browse/JRACLOUD-10507
Related
Questions? Support or support@hullspark.com. Privacy policy