How to bulk delete attachments in Confluence DC/Server
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
For the users of the old version (below 8.8), bulk deleting was not yet supported by Confluence. However, it may be required by Confluence user for below reasons:
Is there a way to delete Confluence attachments in bulk, since deleting one by one needs too much effort when the number of attachments is big.
I would like to delete a large number of attachments in bulk before migrating to Cloud. Is there any way to do this?
This article provided some workarounds to achieve the user’s needs, especially for old version users.
Solution
Method 1
Starting with Confluence 8.8, we have added the ability to delete multiple attachments at once. With this function, you can delete multiple attachments on one page at once. However, to take advantage of this feature, you will need to upgrade to the version of Confluence 8.8.x or higher.
Method 2
Bulk deletion can be achieved by using some add-on apps on Atlassian Marketplace. As examples, we provide the following: Please refer.
Method3
You can also delete attachments using REST API as per our knowledge below.
The customer must create a script to delete multiple attachments at once based on the above REST API.