Remove all tags

  • edited April 18, 2017
    For posterity:

    The Zutilo utility for both FireFox and standalone can remove all tags from one, some, or all selected records en masse.

    Automatic tagging can be disabled by going to Preferences > General, and then uncheck "Automatically tag items with keywords and subject headings".

  • @lagrone.t Thanks a lot for that. Zutilo improves a lot a daily use of Zotero.

    Tag is a great feature for bibliography (in my case). Next step would be for me :
    - to select several items
    - to delete SOME tags, but not all, from all these items

    Let's say :
    Item A : tag 1 / tag 2 / tag 3 / tag 4
    Item B : tag 2 / tag 4 / tag 5

    > I want to delete all tag 2 & tag 4 from all selected items (and selected items could be more than 500 for me sometimes...), but keep others.

    Could it be implemented in Zutilo or useless for most users ?

    Anyway, thanks a lot.
  • It would certainly be useful, but also sounds very technically complex. You could request the feature to the Zutilo developer, but I'm not sure whether he has the time to do something so complex at this point:
  • Thanks @bwiernik for your answer, I will suggest this feature for Zutilo developer...
  • You can delete all automatic tags with a new option in the tag selector menu in Zotero 5.0, now available. Additional tag management will be coming in future releases.
  • Great news. Thanks a lot @dstillman
  • Hello, this is good news. I want to delete all the automatic tags. I can't figure out the path to the tag selector menu. Can someone tell me how to get there.
  • edited September 13, 2017
    Scott see screenshot here: (that's on the bottom left; note you need to be on Zotero 5)
  • HURRAY! Thank you Adam. I would not have figured out where the menu was without the screenshot. A big thank you. Now I can bring order to a 1,000 plus record bib.

    Scott The Librarian
  • I was able to delete automatic tags for some categories in the library but when I try to delete them for a lot of the folders, the delete all automatic option is deactivated.
    Any suggestions.

  • I mean "collections" not folders.
  • Are there any automatic tags left? The function deletes them for the entire _Library_ -- you can't specify individual collections.
  • Thanks Adam, I want to delete them from all collections. It worked for some collections but not others. For the others the link is deactivated. It is faint and nothing happens when you select it. Strange.
  • Are you sure those are automated tags? And you do mean collections, not groups, right? The operation should apply to the whole library, i.e. every collection, too
  • I'm using Zotero standalone on macOS. I have a library (long ago imported from Mendeley) that contains many 100s (probably thousands) of garbage tags that I did not create. However, Zotero does not recognize them as automated tags, so "Delete Automatic Tags In This Library" is unavailable (dimmed). What would be great is a tag management interface that lists all tags with a checkbox next to each one so that I could manually select many tags to delete (one click for each), and a "Delete Selected Tags" button. The current system for deleting tags is completely unworkable for large number of tags.
  • edited February 19, 2018
    Yeah, imported tags from other reference managers aren't recognized as automatic. There's currently no viable non-scripting solution for that scenario.

    Edit: actually check out Zutilo as linked above. I haven't tried it for this purpose, but the post above suggests that it works.
  • Thanks for that tip, adamsmith, but when I pursued Zutilo I was told that it's not compatible with my version of Firefox.
  • You'll need to install Zutilo in Zotero, not in Firefox. See installation instructions here:
  • Ah, thank you, very helpful. Zutilo successfully installed in Zotero.

    Turns out Zutilo does not provide what I need. It will allow me to remove ALL tags from one or more selected references. But what I would like to do is to selectively remove many manually selected (but not all) tags from the entire library. Thanks, adamsmith, for your assistance.
  • My references are free of tags, via Zutilo.

    My clients shows no tags.

    However, Zotero online shows lots of tags and some seem associated with references.

    What is wrong?

    How can I remove all tags, from references and in general, to start from a clean slate?

    I am trying this in pyZotero but with no apparent result

    tags = zot.everything(zot.tags())
    for tag in tags:

    What is the best approach? Can I simply empty some list of tags?

    Thank you for the advice.
  • you can unset tags in bulk by dragging them over the tag-to-be-removed in the tag selector and holding ⌘ (cmd on windows)
  • (Shift on Windows)
  • Here is a solution with pyzotero:

    from pyzotero import zotero
    from toolz import partition_all
    from tqdm import tqdm

    collections = {x['data']['name']: x['key'] for x in zot.collections()}
    tags = zot.everything(zot.collection_tags(collections['COLLECTION NAME']))
    good_tags = ['Decision making', 'Attention'] # I want to KEEP these
    to_del = set(tags) - set(good_tags)
    print(len(to_del), 'bogus tags')
    for chunk in tqdm(list(toolz.partition_all(50, to_del))):
  • edited December 9, 2020
    Thanks @lmullen and @mazibuko for tips that are still valid in 2020!

    Zotero has added a command 'delete all automatic tags in the library', which helps, but for some reason did not delete all of them in my case. You can use -A to select all tags, but if you right-click and say delete, only the one you were pointing at is deleted. It would be good to have a 'delete all selected tags' command.

    [deleted — D.S.]
  • edited December 9, 2020
    @AndySymons: No, please don't encourage people to run SQL write commands on their databases. The posts above that mentioned SQL were from over 10 years ago, before most people were using Zotero syncing. Making changes directly to the database is a bad idea in general, and it absolutely shouldn't be done if you're syncing — the changes either wouldn't sync or could result in conflicts that could permanently break syncing.

    If you want to make changes to your database, you need to do it via the JavaScript API (not SQL) in the Run JavaScript window (or with a plugin that does that for you) or via the Zotero web API.

    I've added a warning to the earlier comments.
  • edited December 9, 2020
    Zotero has added a command 'delete all automatic tags in the library', which helps, but for some reason did not delete all of them in my case.
    The function works, but it does what it says — it deletes automatic tags, not tags that came in as manual tags (e.g., from a file import), and not selected tags.

    Better ways of managing tags are planned.
  • No, please don't encourage people to run SQL write commands on their databases
    Well generally I wouldn't encourage working directly with the database at all, but I had no alternative and it worked for me. I know nothing about the API and am not familiar with Java but would have tried that if clear instructions had been available.

    I don't know where the tags came from. Presumably some kind of import in the past. I just wanted to delete the lot and start a new system of tagging (that has to do with which libraries have the books I want, and whether I borrowed them yet). There were several hundred old tags, so deleting one at a time was not an option.
    better ways of managing tags are planned.
    Great! :-)
  • it worked for me
    If you use syncing, it didn't work for you. All the tags will still exist in your online library and would be pulled down to a new computer.

    As noted above, Zutilo can remove all tags (properly) from all selected items.
  • Partly right. When I started up this morning some tags reappeared that I did not want. However, there were only about a dozen, so I deleted them individually. A manual re-sync after that did not bring them back and the ones I generated yesterday are still there.

    Zutilo is still on my 'to do' list :-)
  • I mean, it's not "partly right" — if you deleted all tags that way in the database, they absolutely weren't removed from your online library, unless you used the reset option to overwrite your online library, which we don't recommend. You can just look in your online library to see this.

    I didn't say they would all reappear on this computer (though they may gradually in the future as you make changes). I said they would be downloaded to a new computer.

    Changes made manually in the database don't sync, unless you know all the things that Zotero does internally to get changes to sync properly. I wrote most of the data layer and sync code and I wouldn't attempt to make manual changes in the database via SQL on a database I cared about.
Sign In or Register to comment.