Error message "A space with key "Key" already exists"
Asked by Kajsa Fransson:

I have exported and importerad an new space to Jira Cloud (as a test). It went well. Now I would like to do it again with all pages included in the space. But now I get the answer:   

"A space with key "Key" already exists"

I have already removed the space and it is not visibel in the GUI. What needs to be done to import it again?


Answers:
author: Tim Kopperud
body: Hi [@Kajsa Fransson](/t5/user/viewprofilepage/user-id/5354145), welcome to the Atlassian Community.

To reuse a previous used key from a space that is deleted, and now in trash, a Confluence Product Admin within you organisation needs to purge the space from the Space Directory.

You might find [this document](https://support.atlassian.com/confluence-cloud/docs/delete-a-space/) helpfull. Notice the topmost blue information:

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/298750i05B9394A32362CB6/image-size/large?v=v2&px=999 "image.png")

TimK

comments: author: Kajsa Fransson
body: Thank you!


author: mike alloy
body: [@Tim Kopperud](/t5/user/viewprofilepage/user-id/492874) I have a similar issue with this error, but not similar enough where your suggestion helps. I have been attempting to import a space via a zipped XML file. On the first try while checking JIRA macros the page was accidentally refreshed and I saw a message that the check was completed. I saw no new space was created so when I tried again I received an error with the string **"A space with key RMG already exists"** during the second stage of the import.

![2024-01-11_16-09-25.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/300165i105EA2041DF2D4ED/image-size/large?v=v2&px=999 "2024-01-11_16-09-25.jpg")

I would assume this was from the first attempt. However, I cannot find a single space in my instance where **RMG** appears and no space title even similar to that. There is no space currently in the trash and no spaces that have been archived are close to this either.

Can you help?

comments: author: Kajsa Fransson
body: I missed this step:  
To purge a space:  

* Click Spaces dropdown on the top nav and select View all spaces.
* Click Trashed lozenge.
* Click the details icon (...) for the space you want to restore and select Delete permanently.


author: mike alloy
body: [@Kajsa Fransson](/t5/user/viewprofilepage/user-id/5354145) That's the weird thing, when I click on **Trashed** there's nothing there


author: Tim Kopperud
body: Hi [@mike alloy](/t5/user/viewprofilepage/user-id/5403631), welcome to the Atlassian Community. I'm sorry, I do't have an answer to that exact problem.

If you still have this issue with **RMG**, I suggest you post this problem in a new dedicated thread. There are two main reasons for this:

* Since this thread as been tagged as **Answer accepted** it will not be monitored by other community members who might be able to help (e.g. I only look for non-answered questions myself).
* Community leaders are able to escalate a problem if needed. A solved issue will not be escalated, and **Answer accepted** is regarded as solved.

So, if you post a new question (new thread) you will have more community members looking into this issue together with you, and someone might come up with a solution for this problem.

TimK.


Tags: cloud

confluence-cloud