Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Is there a way to remove files from the downloads folder?

We are using the downloads folder to deploy our artefacts and we recently started having serious issues with this page not showing any files anymore. We can access the folder through the API, which we use to download files via our Jenkins CI.

We have an agreed retention policy of our build artefacts and to enable this, we want to be able to remove artefacts that are older than a certain value. I could not find a way to do this via API or any other way so far.

I would love to get some insights from the community on this one.

1 answer

0 votes

Hi Erik,

By downloads folder, I assume that you are referring to the Downloads section of a repo?

There is an API endpoint for deleting a certain file from the Downloads section of a repo, but I believe it is not possible to filter by date (so, delete a file older than a certain date).

This could perhaps be done if you write a script that gets all files from the Downloads section via an API call, then manipulate the JSON string in the output and filter by the created_on date, so that you get files older than a certain date, and then delete those files via an API call.

Regarding the Downloads page not loading for you, there is a possibility the page may not be loading due to a time out error. How many files do you have uploaded approximately? I've seen similar issues reported by users who've had a few thousands of files uploaded in that section, and the page was not loading because the request was timing out.

Kind regards,

Suggest an answer

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

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,916 views 10 16
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