Deleting spam group
Clone this wiki locally
Here are some ways to purge a group called 'hacked-by-slayers-hack-team' (which is not a hack at all, simply spam/graffiti).
On your server run:
$ psql ckan -c "DELETE from public.group WHERE name='hacked-by-slayers-hack-team'; DELETE from group_revision WHERE name='hacked-by-slayers-hack-team';"
Or if you have CKAN 2.2 or later you can do this: (replace the host with your own CKAN server and put in your sysadmin's API key)
$ curl http://your.ckan-server.org/api/action/group_purge?id=hacked-by-slayers-hack-team -H 'Authorization:yourAPIkeyhere'
Using Paster shell
Alternatively you'll need to use paster shell:
$ paster --plugin=pylons shell /var/ckan/ckan.ini
g = model.Group.get('hacked-by-slayers-hack-team') assert g (check there is not an error) g.delete() model.repo.new_revision() model.repo.commit_and_remove() model.Group.get('hacked-by-slayers-hack-team') assert not model.Group.get('hacked-by-slayers-hack-team') (check there is not an error)