Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Jira Projects move to Trash after deleting, how to delete them permanently

Soumik Mukherjee November 26, 2023

Hi community, recently I came across an issue on Jira. I am actually writing automation codes which create Jira Projects, issues, custom fields and associate them correctly through a project setup configuration file that I have created.

After all the configuration is done, I run multiple tests on them and finally I want to delete all of them.

I went through the API documentation and found REST APIs that delete all of them, but the projects move to Trash. So, the next time when I run the tests, it looks for the projects through a GET call and gets a success message since the API calls consider the projects in the Trash as existing only. But then when I try to associate the issues, custom fields, etc to the project, I receive an error.

So, how can I delete the Projects from Jira and then from the Trash through REST API?

2 answers

1 accepted

1 vote
Answer accepted
Soumik Mukherjee November 28, 2023

Hi community, I have myself found the REST API for the same. As a matter of fact, it is not actually a DELETE API, which ideally it should have been, rather it is a POST API.

The API is:

/rest/api/3/project/{projectIdOrKey}/delete

We can read more about it here

matthew baltrusitis
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 17, 2024

If you'd like to utilize a proper DELETE API, you can pass the `enableUndo` query param.

 

```

/rest/api/3/project/{projectIdOrKey}?enableUndo=false

```

Like # people like this
Soumik Mukherjee February 23, 2024

Thanks @matthew baltrusitis this is definitely an alternative to the way I suggested. Appreciate the response.

0 votes
Berat Altunhan
Contributor
November 27, 2023

Hi, ,

If you are Jira admin, you can follow these step:

1. Click 'Setting' button from the right corner.

2. Click 'Project' and than click 'Trash' button.

3. Click three dots and select delete permanently.

Soumik Mukherjee November 28, 2023

Hi @Berat Altunhan thanks for the answer, but I wanted to know the REST API for the same as I have already mentioned in the question at the end.

dirk neethling
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 16, 2024

I deleted a project which then went to trash for 60 days. Now I am trying to create the same project under my other username, but it says the project already exists.

I tried following your advice in order to delee the project from trash, but when I go on Settings, there is no label "Projects", only "Atlassian account settings", "Personal Jira settings", "User Management", and "Billing"

Junior Atemebang Ashu
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 18, 2025

Just for anyone confused with a similar scenario:

It is important to know that Jira does not have a traditional "recycle bin" or "trash" feature that allows you to easily recover deleted boards or projects.

Once an issue is deleted in Jira, it is permanently removed from the Jira database.

The user can only recover such deleted instances from either locally backed up Jira Cloud or Jira Server files or other complex means. 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events