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

How can i delete all archived cards?

Bilgehan Yilmaz October 3, 2017

Hi,

How can i delete all archived cards?

Thanks,

Bilgehan

21 answers

19 votes
David_Marley April 17, 2019

I second the calls here for a way to delete directly. Exactly as previous commenters have said, having to archive then delete is extra clicks, and the archived items just clutter up search results. The ability to delete directly/easily would be a big improvement.

Brian Sword September 6, 2020

This seriously needs to be a function they add!

Like # people like this
Deleted user June 3, 2021

Sorry Atlassian, but this is classic bad behaviour. Pretend to give users control over their data, but then make it really hard to actually delete it.

This issue has been open for nearly 4 years. Not good enough, I am deleting my account today.

Like # people like this
14 votes
jwktje November 14, 2020

I have a solution!

I stumbled upon this page after googling for a solution to this problem. I had to manually delete 200+ cards which was annoying. So I created a codepen to automate it. Complete with an "Atlassian Blue" form button.

Here it is: https://codepen.io/jwktje/full/XWKOEeR

It automatically gets all archived cards on a board and deletes them for you. This is done through the official REST API for Trello using only Javascript Fetch and your own user API key and token. This means the script runs locally. You don't need to install anything or allow oauth access to your account, and no third-party needs access to your account.

The script is open source inside Codepen so you can check my Javascript.

If you found this useful please vote this answer up and maybe think of me for any future projects where you need custom business logic and/or automation. I'm not spamming my website here but it's mentioned on the Codepen

Andrey Mikhaltsov June 2, 2021

it works,thank you!

Like # people like this
David Howell August 7, 2021

Thank you for creating something that will do this! I've tried to use this a few times and after I input the required items it says...

Input received. Getting all archived cards on board: wrT5SAIW
Waiting on input in the form above...

It appears that it's waiting on more info from me, but I've already input the details that it's asking for. 

Any suggestions? I desperately need this, lol. I have over 19k archived cards and the new calendar view will not work for me due to this. 

Thanks in advance for any advice you can give.

Thanet Takkinan August 11, 2021

xxxxxx.jpg

I've tried to generate API keys but found this error. Any suggestion?

Like David Naylor likes this
Christian Salem October 9, 2021

@jwktje This works perfectly. Thank you!

Spencer Phillips February 6, 2022

@Thanet Takkinan I ran into the same, but worked around by opening the link in "The API key and token can be generated here." in a new tab instead of the same window.  Worked great afterwards. Thanks!

David Naylor April 23, 2022

What a convaluted process. I would like a setting in Trello which you could switch to always delete cards rather than archive them. Most other To DO lists have this. Why is Trello so stubborn on this?

Like # people like this
Sylvia Alfonse August 11, 2022

Works perfectly thank you!

Pieter Van Conkelberge September 27, 2022

The script "sees" all my archived cards, but after "deleting" them, they are still there. Anyone with a sollution?

matt.mangel October 18, 2022

Thank you for this solution!  Works like a charm.

Ted Mead August 17, 2023

Cool.  Thanks.  Saved a ton of time.

Aab August 18, 2023

Works perfectly Thanks 

8 votes
Muhammad Atpur Rafif July 13, 2021

You can use this script to delete all your archived cards. The steps are much easier than my old answer:
1. Open your board, where you want to delete all of your archived cards

2. Open dev console, and copy paste this code

(async function(){
    async function getJSON(url){
        let res = await fetch(url)
        let json = await res.json()
        return json
    }

    let dsc = decodeURIComponent(document.cookie.split(';').find(v => v.includes('dsc=')).split('=')[1])
    let boardId = (await getJSON(window.location.origin + window.location.pathname + '.json')).id
    let archivedCards = await getJSON(`https://trello.com/1/boards/${boardId}/cards/closed`)
    for(let {id, name} of archivedCards){
        await fetch(`https://trello.com/1/cards/${id}`, {
            method: 'DELETE',
            headers:{
                "Content-Type":"application/json"

            },
            body:JSON.stringify({
                dsc
            })
        })
        console.log(`${name} deleted`)
    }
    console.log(`Finished, total ${archivedCards.length} cards deleted`)
}())

And, boom. Just wait till all the cards deleted.

Ryder Wishart September 9, 2021

Thank you. This approach worked beautifully with one small tweak to your code (it didn't work for me otherwise):

for(let i of a)

Instead of:

for(i of a)
Muhammad Atpur Rafif January 10, 2022

Oh yeah, sorry about that. I am still amateur at Javascript. It's already fixed.
And also, I have an idea about using promise, so it can be fully automated, not sure if I am going to (or can) implement it.

Anscombe, Rob (GB) May 5, 2022

Brilliant. Thank you

Muhammad Atpur Rafif May 5, 2022

You're welcome, and I just updated my script to be asynchronous. So we don't need to spam the script again. And I save the old answer in this reply, in case someone need it.

Like Anscombe, Rob (GB) likes this
Muhammad Atpur Rafif May 5, 2022

---OLD ANSWER---
I have a dirty little trick to delete all archived card without installing any apps or power ups. You just need a dev console from your browser. Steps:

  1. Open Trello archive panel, in top left "Show menu>More>Archived items"
  2. Spam this code until all cards showed up, by copying and pressing enter repeatedly, until you think its enough, or load more cards no longer visible

    document.getElementsByClassName("show-more js-more-cards")[0].click()
  3. Spam this code until all cards deleted, by using same method as before
    let a= document.getElementsByClassName("js-delete")

    for(let i of a){

    i.click()

    document.getElementsByClassName("js-confirm full nch-button nch-button--danger")[0].click()

    }
    This code will click delete button, and confirm the deletion prompt. If there is any error with warning "Cannot read property 'id' of undefined", its okay, that because the script cant access already deleted cards div html elements.

This steps work, at least at 14 July 2021. I found this methods after learning about web scraping. You can verify the code, and sure all of this is client side. Rinse and repeat if needed. This method is nice, if you dont want to share your API token.

Like papko26 likes this
Anscombe, Rob (GB) May 6, 2022

Thank you, @Muhammad Atpur Rafif .

I'm happy to confirm the new single script works brilliantly, without the need to refresh the list of archived cards.

Thanks again.

Evan Van Orden October 7, 2022

This was incredible.  You just cleaned up 2 years of cards for me in about 2 minutes.  Thanks Muhammad!!

brtam43 November 4, 2022

I need one additional help once the "Created" field format is different (2021-09-28T12:30:59.000Z) and I'm not a developer. Maybe it is something like 2021* or 2021%. On that code, how do I add a condition to delete all cards from a specific year (E.g.: 2021). Can you help pasting the entire code line for that condition? I believe that additional condition would go inside this for:

for(let {id, name} of archivedCards){

Thank you in advance.

Muhammad Atpur Rafif November 7, 2022

You can check all response type and some example of it on REST API documentation. I only see "dateLastActivity", probably you can use that (I am not sure if it's when the card deleted or created). Since I directly DELETE the cards before even read it, to make filter, you need to use different method, call the API twice, first GET to check the information, then DELETE if it's pass, you can make it with simple if-else syntax.

Felipe Lohnefink
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 12, 2023

I keep getting 403 forbidden. My decodeURIComponent(document.cookie.split(';').find(v => v.includes('token=')).split('=')[1]) has no token. Any thougths?

Muhammad Atpur Rafif November 15, 2023

Thanks for the notice. Since they changed "token" string into "dsc", we need to change the POST body. I've updated my answer for this. 

Ian Loureiro do Carmo January 17, 2024

Thank you so much my friend!!!

This code works perfectly... Congratulations!!!

I would pass entire years just deleting them mannualy.

Go ahead guys. Use it. :)

7 votes
SlymOre June 22, 2020

Being able to bulk delete cards is a basic matter of privacy. I want to be able to do this with my data. It should be an option offered by trello

Mike Harrison July 10, 2020

I also agree that you should be able to bulk delete for matters of privacy and general housekeeping.

SlymOre September 7, 2020

For those familiar with Docker, I've made a small routine for bulk deletion of trello archived cards: https://github.com/selimrbd/delete-trello-archives. It takes some time to completely delete all cards if you have several thousands of them (~ 600 deletions / minute).

Like # people like this
6 votes
Erik Doernenburg June 7, 2019

I second the calls here for bulk deletion.

Brian Sword September 6, 2020

This seriously needs to be a function they add!

Like # people like this
4 votes
Bren de Hartog June 25, 2020

I would also like to have this option available in the App and/or on the website. I know that this comment might actually give Trello/Atlassian an excuse not to implement this feature at all, but in case you still want to remove your Archived cards, I've created a small program that uses the Trello API to iterate over all your boards and delete all archived cards. Don't blame me if it doesn't do what you want, YMMV, etc.

For the brave, see https://github.com/hartogjr/trello_api_client 

Shlomi Harif June 25, 2020

Works for those with full access to Linux machines and dev chops (which I have), but it's not a feature -- it's an applet. :) I'll check it out!

3 votes
Brian Sword September 7, 2020

Hello Trello? Are you listening? There are A LOT of us that are clamoring for better delete options for OUR data (chiefly bulk deleting functionality). Please don't be evil and give us this functionality!

2 votes
Nikola Kohout March 16, 2021

I don´t know if this helps, but I am deleting all archived cards by makind a board duplicate and deleting the old ones. The archived does not copy with lists and cards along. 

Amy July 21, 2022

Good idea...this seems much easier than deleting hundreds(thousands?) Of archived stuff.  I'm shocked that there is no "proper" way to just delete all the archived cards...just like you empty the trash folder every once in a while after you're sure you don't anything in there again.

Evan Van Orden October 7, 2022

This is another great idea.  If you frequently archive whole lists, another solution is that you can create a "Delete" board and instead of archiving the lists, you can move the lists to the Delete board and then just close and delete that entire board.

1 vote
Tig da Admin February 24, 2021

2021 and we STILL don't have this feature? Sure, we can get an add-on or get code from someone's Docker library (assuming the latest updates didn't break the code?), but sheesh. Users have been asking for this feature for years.

I finally gave up and created a new board, moved all active lists to it, moved all the Butler tasks, and closed the old board.

1 vote
tom_colvin January 20, 2021

A one-off solution is to duplicate the board. Click the menu in Trello, then click Copy Board. You will then get a copy of the board without its archived cards or lists.

Shlomi Harif January 20, 2021

I did that early on in searching for a solution... they followed me to the new board. And no, I have NO idea how that worked. I created a new board, with new list names... didn't stop 'em from appearing in the same list position (i.e., 1st one, 2nd one) that were in the original board (which I deleted, after archiving the cards and lists in them first). I submitted this initially as a bug. Weird feature, as it stands...

Tig da Admin February 24, 2021

When I tried to copy the board, the system balked. Maybe I waited too long and there was too much cleanup ;-).

1 vote
SlymOre August 11, 2020

For those familiar with Docker, I've made a small routine for bulk deletion of trello archived cards: https://github.com/selimrbd/delete-trello-archives. It takes some time to completely delete all cards if you have several thousands of them (~ 600 deletions / minute).

1 vote
Teddy October 24, 2019

I also second the option to have the following features:

- card action that allows immediate DELETE (with warning) instead of archive

- bulk action to delete all archived cards at once

Reason: I use the JSON export to work with my data (primarily to just print a single card list using http://connie-clark.github.io/print-trello/) BUT the page takes a very very very long time to load because the JSON is including ALL data including all archived cards (JSON file is about 20x larger than it needs to be)

1 vote
Paul Balyoz July 10, 2019

I understand Trello developers not wanting people to harm themselves by directly deleting cards - make them archive cards instead, and delete them one-by-one afterwards, if absolutely necessary.  Most people think they want a "delete immediate" feature, until they delete something important and can never get it back. The principle of archiving first & deleting later is a very very good idea. Most email systems do this, when you "delete" an email it just goes into a Trash or Recycle folder (which often expires old items after some amount of time, and gives the user a "empty trash" button of some sort for manual cleaning).

I have a task-list board which has had so many cards pass thru it over the last few years, it's pretty large when I back it up (by saving the JSON data for the board to my laptop).  And I know that I will never want to retrieve any of those archived cards, yet they stay associated with the board as part of its data.

Maybe a compromise can be found, such as a single button under board settings, "clear old archive", which would delete any archived cards older than like 1 year old.  And it would need an "are you sure?" prompt, so people can't delete things unexpectedly.  That would help me a lot.

I guess I could create a fresh task-list board, copy all my lists from old board to new board, delete the old board, and rename the new board to the old board's name.  I could just schedule myself to do that once a year ("spring cleaning"). Maybe I'll do that.

Erik Doernenburg September 20, 2019

The thing is that products like Trello are used by people with many different use cases. I get what you write, Paul, and everything sounds sensible. Then put yourself into my shoes: I wrote a script against the Trello API to bulk import cards from another source. In the script I made a mistake which resulted in the description field to be wrong. So, I found myself having to delete 200 cards... And, yes, there are API endpoints to close (archive) and delete cards, but I guess you understand why I didn't necessarily want to write a custom script to delete cards.

Brian Sword September 7, 2020

Test.

0 votes
Marcus November 30, 2022

"This issue has been open for nearly 4 years. Not good enough, I am deleting my account today."

Issue is still open since 5 years. That's clear eveidence that everything is about to store your data not allow to easily delete them. I plan to move my data and delete account.

Guilherme Michelotto
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 20, 2022

Hey folks,

Thank you for bearing on this one with us. I know this is a highly requested feature, and although we do not have an ETA for this one yet, we do have an amazing workaround tool created by one of our Support Engineers. 

Hope you have a nice week!

0 votes
Deleted user July 14, 2022

It's another work around that I use. More low tech than the others suggested. I've no idea about code or API or any on that stuff.

I have created another board called Archive, this board has one list also called archived

If I want to archive a card I just Move it to that board and list.  Then later I can use Bulk actions and delete then if I want to.

I did of course originally have to manually delete cards that I had previously archived one by one but that's a couple of hours and then it's done

 

Brixton

0 votes
Keruchan October 2, 2021

Another necessities not being address by trello.

I know it might have something to do with security or something.  But that can easily be fix by only making the. Feature available to premium and enterprise admins.

Or just simply set a password for deleting all archive. 

0 votes
Maria
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
March 25, 2021

Hello :)

There's an easy way to delete cards using Planyway, you'd just need to press shift+delete while hovering over a card or by multi-selecting several cards and then pressing shift+delete.

You can read more here: https://planyway.com/help/features/tips-and-tricks#2-delete-a-card-with-one-click

0 votes
AlisonWonderland July 21, 2020

The fact that there has been zero engagement on a 3 year old open issue, and no updates, makes me want to use a diffferent service. 

There are multiple use cases for enabling this feature, or at least enabling an API that could do it.

Terrible support, terrible community engagement.

You just lost a previous Trello advocate

jwktje November 14, 2020

I posted a solution

0 votes
Alkis Mylonidis September 19, 2019

I would also like to have the option to bulk delete archived cards.

 

Since this option is not available now, I use the following workaround:

I create a board called trash with a list called trash.

Then instead of archiving cards, I move them to the trash board/list.

Then every once in a while, I close the board, delete it and then create it again.

All cards in trash are deleted.

Teddy October 24, 2019

agreed!

Abbo Peterson November 26, 2019

Clever workaround. Nice.

I just don't understand why Trello won't add the OPTION to delete all archived cards. Make the people who want that feature happy. Don't punish us.

0 votes
Marta Galofre de Alos
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 4, 2017

Hi Bilgehan,

Marta here, from Trello Support.

Right now, it's possible to delete cards by accessing the archive, which you can find on your board's menu, and deleting them from there. 

Right now, it's not possible to bulk delete archived cards, so you'll need to do that one by one. 

Here's an article from our help docs that gives you more details about it: http://help.trello.com/article/795-archiving-and-deleting-cards

I hope that helps!

Marta

Scoox October 10, 2018

Are there any plans for bulk-delete? Furthermore, if there was a way to delete cards and lists directly rather than having to archive them first. Maybe it's just me but I've never needed to revisit an archived task, but then again I'm a private single user, and usage patterns may vary when Trello is used as a collaborative tool. Still, those of use who use Trello as a to-do list would welcome a direct way to delete. For us, having to archive, then delete, is an unnecessary extra step. Like the Chinese say, it's like "taking off one's trousers to fart". I'd say make both options, "Archive" and "Delete" directly available, and let users decide what they wish to do. Thanks for an awesome app!

Like # people like this
Scott Ivell November 13, 2018

+1

I don't understand why bulk delete (either in-app or api) is so restricted.. it's almost as if you want to retain the cards for your own use...

Deleting cards is currently a multi-click process with modal pop ups - this isn't a 2018 way of doing things - why can't i just swipe left to delete them from the archive in iOS??

Like # people like this
sanan-fataliyev February 12, 2019

PLEASE add this feature. achived cards are shown in search result and causes slow response. which is not what I search (and likely for most people).

Like # people like this
Jason YH October 7, 2019

Hey, Team Trello (I'm addressing you because Taco would surely do as asked)!

This has been an open complaint for years now..

I want to add to the chorus above. In addition to the needless multi-clicks to delete a card when we know it is not required (but are forced to Archive it first anyway), you also make us go into EACH board archive individually to look for archived crap. There is no easy way to view all archived cards across boards.

And I echo the question Scott Ivell raised above... Is there some data mining reason or internal (investor-related) metric that makes you cling to this stuff that your users would delete? I know that AWS space is cheap, but... what's the story?

Aren't you the least bit concerned about Asa na?

Like # people like this
Abbo Peterson November 26, 2019

I also echo Scott Ivell and Jason YH wondering whether Trello wants archived cards for data mining. I'm not against data mining in itself. However, for the users that have good reasons to easily delete archived cards, don't punish us. I'm sure there will still be plenty of users who have collections of archived cards if Trello wants to use that data.

FEATURE DETAIL: I'd like the option to easily delete a range of archived cards. For me, I'd like to delete all cards older than a month, for example. I would be happy with a relative date range feature, e.g., delete all cards older than __ timeframe (days, weeks, months, years). I would accept a selection checkbox interface, e.g., a select all button with the ability to uncheck one or more cards. I prefer the former method.

Like # people like this
Shlomi Harif June 22, 2020

Marta:

I think it's a important for there to be a multiple delete option -- especially if paired with one that allows display of a search for matching cards. Here's a real use case:

I created a daily repeating card to shovel the walk to clear snow. It's summer now, and I don't need to see it. I want to delete all cards matching that title (or date range, or matching text in description, etc.) without having to do the two-step of finding the archived card and deleting it.

Another side notem Marta, until the original "repeat" card is deleted, it will auto-populate the card every day even if archived. I think this is a bug, as archiving it should cancel it's ability to generate new cards.

Like # people like this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events