[ckan-dev] Purge all packages?

Sean Hammond sean.hammond at okfn.org
Mon Jan 14 11:01:15 UTC 2013


> What is the recommended way to quickly purge all packages and
> resources from CKAN without removing users and groups?

You first need to mark all the datasets as deleted. I'm not sure if
there's a provided way to delete _all_ datasets with a single command or
click. You might have to write a simple script to do that yourself. You
can do it using the package_delete apiv3 action, or the paster dataset
delete command.

Once you've deleted the datasets you can also purge them one-by-one
using the paster dataset purge command, but if you go to
/ckan-admin/trash there is a Purge them all button that can purge all
deleted datasets and revisions.

I assume that purging datasets also purges their resources.




More information about the ckan-dev mailing list