deleting a large number of tags efficiently

I inadvertently created a lot of tags (probably hundreds). Deleting them in the tag window is very time consuming as it has to be done 1-by-1 and each deletion takes several seconds. Any suggestions on doing this more efficiently for a 1-time deal. Is there a reindex option or something that would delete all unused tags?
  • edited May 16, 2010
    Selecting the library in the left window, opening the tag selector with ctrl-alt-T, selecting the tag, then right-clicking on the tag (again in the lower-left tag selector) gives a menu with an option to rename or delete it. Clicking on "delete tag" opens a popup that says it will be deleted from all items. Does that work?

    (Edit: Ah, I see that I misinterpreted the problem.)
  • Thank you, but that's what I've been doing but it is very time consuming to do it one tag at a time, since I have hundreds to delete.
  • edited May 17, 2010
    Sorry, I misunderstood. There's no batch delete facility for many tags with different tag names, as far as I know.

    If you're comfortable with SQL and some scripting language like Python or Perl, you should be able to build a small program to perform the tag deletes directly in the database (after making a backup copy of all your data for safety). But that route is not for the faint-hearted, not without risks, and probably not something you want to try if you're not already comfortable with the languages involved.
  • You definitely don't need a scripting language, but you would need to know SQL and have a solid understanding of the database schema.
  • Though I'm unclear on why you're calling them "unused" tags... Unused tags are indeed purged automatically. And if they're only linked to one item you can delete them very quickly, and then Zotero will purge them.
  • Dan, my library was created after numerous attempts to import a 2300-reference library from Endnote. I had a very hard time trying to get the formats to work. I repeatedly imported references, and in many cases tags created from keywords were actually combinations of many Endnote keywords, and in some cases entire lines of text from abstract fields, and so forth. I eventually deleted the multiple copies of these references. (It was a real mess.)
    So now I have a lot of tags that show up "greyed out" when I select "Display all tags in this library" that are artifacts of that process. There are no longer any references associated with these tags, but they're still there. Deleting each one requires takes seconds in Zotero (and it looks like a big disk I/O activity). There are hundreds, so it's rather time consuming to clean it up. And I'm bothering to clean it up because I think it's making Zotero sluggish to maintain this huge inventory of unused tags.
    But I am groping in the dark here, so would welcome insight from a more knowledgeable source.
    Now I have 34,000 items in my trash. Would emptying the trash make the unused tags go away?
  • Now I have 34,000 items in my trash. Would emptying the trash make the unused tags go away?
    Yes.
  • Well I guess it should be a no-brainer, but yes, deleting the 34,000 items in my trash has gotten rid of the unused tags and also made Zotero much zippier. The only suggestion I might have for novices like myself is if Zotero were to prompt users when their trash cans are getting so large that they are impeding the performance of Zotero. Thanks for the suggestions.
  • edited July 2, 2010
    "Though I'm unclear on why you're calling them "unused" tags... Unused tags are indeed purged automatically. And if they're only linked to one item you can delete them very quickly, and then Zotero will purge them. "

    Usually they are purged, but I have some that won't go away. I am absolutely certain they aren't associated with anything, and are dimmed when I select My Library. Advice appreciated

    Have tried rebooting system too

    Isis
  • @isis: and you emptied the Zotero trash folder?
  • I have now -thanks!

    But still a bit odd (to me) that even when the trash is empty I need to do this to make one unused tag disappear. Oh well, not a big problem
Sign In or Register to comment.