Simple and easy steps to remove all the tags in your Zotero Library.
The script works on the library you last selected or interacted with. it does not work on collections (you can modify it to do what you need.)
- Ensure that your are using (Zotero 5).
- click on your library icon.
- click Tool (from the top).
- hover to Developer.
- click Run JavaScript.
- mark the check box "run as async function".
- Copy the code below and let it run.
- The script will rename all tags to "DELETE ME", Zotero will combine them.
- Delete the tag named "DELETE ME".
- Hit the Sync button (top righ corner).
var libraryID = ZoteroPane.getSelectedLibraryID();
var tags = await Zotero.Tags.getAll(libraryID);
var num_tags = tags.length;
var num_affected = 0;
for(let t of tags){
await Zotero.Tags.rename(libraryID,t["tag"],"DELETE ME");
num_affected++;
}
return "tag found: "+num_tags+" tags renamed: "+num_affected;
not responsible for any data loss. This worked as intented on my machine.