Deleted Space, want to set up again - Error: "a space with this space key already exists"

1. I deleted a space.

2. I want to set up a new space (via a default space template) with the same name and the same SPACE KEY as the deleted one.

Confluence throws the error message "A space with this space key already exists".
(as in german language: "Es existiert bereits ein Bereich mit diesem Bereichsschlüssel.)

Note: I deleted the whole space, not only the space home page.

What can I do? The department needs their acronym as space key, I cannot just set any other name.

6 answers

1 accepted

2 votes
Answer accepted

I am a little confused at the moment.

When I checked the spaces list on the dashboard one day later, there suddenly my deleted space reappeared.

I am 100% sure that I deleted the space (by the procedure explained in ).

All we did was flush the caches and wait one day.No messing with the database, no server reboot.


Well, I tried again and was able to successfully delete and set up the space again this time.
No problems with a duplicate space key...

Anyway, I would like to thank you for your help!

I have just recently created a jira project, then deleted it and re-created it, so in Jira you can do this.

You are right I believe that is the way it used to be. I've always had that idea.
Thanks for the update :)

0 votes
Hello MJP,

I heard some cases with the same problem that we are facing right now. Basically it seems that the spacekey is stuck in the database, and to fix this problem, we need to run the following SQL query, to see if the space still exist:

SELECT * FROM spaces;

If still exists, you can run a SQL statement to delete. But I highly suggest that you do a full backup of your instance before running any SQL query.

If that doesn't work, you might have to change the space name, due the special character: ü

This should do the trick.


It's always best practice to create backups before deleting, you might be able to recover the space/space key that way, then go from there.

Another option is to go straight to the database and try to delete all records from that space, (is never recomended to mess with the db, even if you know what you are doing).


See: How to manually delete a space

If any of these things don't work you might also need to delete the space ID and KEY from the table. Have not tested that so if you try BACKUP!

I would like to avoid messing with the database.

Just remembered that a restart of the server or flushing the caches might work...
I will try tomorrow.

Yes, I would defenitly try that before messing with DB.

I got this error after deleting a project. What I later realized was that, even though I deleted the project, an Agile board for the project somehow stuck around. After I deleted the stray board, all worked as expected.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 12, 2019 in Confluence

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

275 views 2 10
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you