Quick way to delete many vocabulary terms

I am looking for a quick way to flush a VOCABULARY:

I want to keep the VOCABULARY since it is referenced in several objects already.It contains 900 entries and I want to delete all of them to refill it with new content.

I tried to do it via PyBIS and everything worked fine, as updating a vocabulary, but the deleting doesn’t work:


KeyError: 'VocabularyTerm'

Is that a bug in PyBIS? And besides that, is there another way to do the task?

are the vocabulary terms alreday used in some objects? If so, deleting the terms will lead to loss of information.

No, they are not. But the Vocabulary itself is used in some objects which are in the making.
I know that I could just delete the vocabulary but I wondered whether I can keep it and the references in those objects since I have otherwise to recreate those properties.

I investigated this issue and indeed, there was a typo in a delete term implementation on the PyBIS side. I fixed it and put in the release candidate. You can check it here:

It is a release candidate (1.63.4rc2), it will be incorporated in the official PyBIS release later.

Thanks @alaskowski , that will help!