Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Deleting versions of attachments is failing

Hi all,


I got a request from a user today to remove some of the recent attachments added to a page to correct for mistakenly uploading a new version that had no changes.

There are 5 versions on this attachment, I needed to delete the most recent ones.

I deleted the 4th using some code in scriptrunner to do so via the API, but afterwards I received errors saying I cannot do the same operation on a 'current' version.

So I navigated to the GUI attachments section for the page, opened up the versions dropdown and tried to delete it.

The confirmation dialogue box pops up, and I can see when I press 'OK' in the confluence server logs, but nothing happens. 

Did I mess up the api requests? I saw something in the forums while building it that it didn't delete from the db, not sure if that causes what I'm seeing here.


Testing on another page I was able to delete other versions with no problems, further testing in progress to see if it was my script that caused this.

Either way has anyone experienced this bug and know how to correct it?


1 answer

I never found a solution for this, I ended up just having to save the newest version I wanted to keep then removing all the bad ones and re-uploading the one I wanted to save as the latest. I did this by going to the attachments for a page, and as the site admin I could delete any versions through the GUI.

Glad I got it working through the api at first, kind of a shame I couldn't figure out how to roll back to the previous version of the attachment and delete the current one through the API.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Confluence

An update on Confluence Cloud customer feedback – June 2022

Hi everyone, We’re always looking at how to improve Confluence and customer feedback plays an important role in making sure we're investing in the areas that will bring the most value to the most c...

89 views 0 0
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you