Method to purge all archived content

Hi MB support team. I was wondering if there is a method to clear out all archived content. This would be to periodically cleanup and compress the metabase database file.

Also, i cannot archive my personal folder in v0.33.3. There is no edit icon in the collections page. in its place is a create SQL icon

thanks for help,
Chuck

1 Like

Hi @crwheelr
There’s currently no auto-delete of archived elements. The only options currently is either to manually do it or create an API request periodically, which deletes archived elements.
You cannot archive the personal collections - they are tied to the user.
I don’t understand what you mean about “in its place is a create SQL icon”. Where are you seeing that, can you provide steps-to-reproduce or a screenshot?

Hi @flamber,
Can you please direct me how do delete archived items manually or by API request?

regarding your question, i am on the screen viewing items in my personal collection. I wanted to archive, really delete the entire collection as i am using this copy of the db to distribute to my customers (prod). Following instructions in users manual to archive a collection I searched on the top of the form , right side of teh blue band, and what i see is a rectangular icon with fly by message Write SQL. Here is where i would have expected option to archive the collectdion.
Chuck

@crwheelr

If you want to manually delete archived item, then it can be done by clicking the hamburger-menu (the three-line-icon), click “View the archive” (or go to the URL /archive), and click the trash-icon next to the archived item to remove it. Some items does not have a trash-icon and cannot be deleted.

If you want to do it with the API, then check some of the DELETE requests like:
https://github.com/metabase/metabase/blob/master/docs/api-documentation.md#delete-apicardid

As I said before, you cannot archive a personal collection, it’s tied to the user.
For non-personal collections, you click the pencil-icon (:pencil2:) and click “Archive this collection”.
Anything in the blue top-bar are general controls, not related to the page you’re viewing.