how to remove all attachments

Hi, my zotero storage is nearly full and I can't figure out how to reduce the size. I only need the citation entries: no PDFs and no snapshot webpages, although I was previously downloading these on accident. I turned that off.

I want to delete all the non-citation data in my library. I worked on this for an hour or two already and haven't solved it. I found a lot of unnecessary files in my zotero storage folder (gif, jpg, json). I deleted those, and the local library is now 50mb. The server reports 280mb however. I even purged the server and resynced it, and it still says 280mb. So I'm confused, and open to any suggestions about how best to go back to the plain citations and avoid any additional files stored on the server.

Thank you.
  • why don't you just turn file sync off (sync tab of the preferences)? That would seem like the fastest solution to your problem. You can then decide to purge the storage on the server or not--it really doesn't make much of a difference.

    It's possible to delete all attachments, but it's going to be more cumbersome.
  • Thank you. I did turn file sync off, but the files remained. I also purged the online library from the firefox plugin, but nothing changed. If I choose "purge personal library" at https://www.zotero.org/settings/storage will that erase my local library at sync?
  • "but the files remained" -- right, but why is that a problem?
  • Thank you. It's not an immediate problem. Long-term, it's a waste for zotero to host hundreds of mbs I'm not using, and it increases the possibility of me running out of space again.

    If I choose "purge personal library" at https://www.zotero.org/settings/storage will that erase my local library at sync?
  • no, that will just remove the attachments stored on the server (you can't, btw., run out of storage with file sync disabled. Only file sync affects your storage).
  • I guess I'm set. I will purge it. Thanks for your help.
  • Pretty much the only time to use purging is when you switch from Zotero File Storage to WebDAV. Otherwise, if you don't want the files then you should delete the attachments in Zotero, empty the trash, and sync. If you're still seeing more usage than you expect online, then you didn't delete some attachments, didn't empty the trash, or didn't sync. Purging erases stored files on the server that are associated with synced attachments, but there's no guarantee they won't be synced back up again, since the only way for then to exist at all is if the attachments still exist.
  • Thanks Dan, and what's the best way to delete all attachments in zotero? I manually deleted a bunch of files in my local zotero storage folder, but that lower storage total isn't reflected online even after purging and syncing.
  • Just delete them in the Zotero interface and empty the trash. You should never make any changes to the Zotero data directory yourself.
  • I don't want to, but I don't know how else to do this. There are hundreds of records. Is there any way to delete all the attached files?
  • I answered this — delete them in the Zotero interface the way you would delete any other item (i.e., by selecting them and pressing the Delete key) and empty the trash.
  • Sorry that we're talking past each other a bit. What I meant was, is there a way to delete all of the files for all entries without doing it manually by entry? And I think the answer is no. Thanks for your time.
  • edited March 25, 2015
    You can search for keywords like "snapshot" in the search bar or create a saved search from an advanced search for [Item Type] [is] [Attachment]. In the results, do a Select All (Ctrl/Cmd-A) to select the matches and delete them.
  • MAGIC! Ah, thank you.
  • As a reference, I searched "pdf", selected all with Ctrl + A, right clicked on a file and moved to trash.
  • This thread was very helpful 3 years later. Thanks all.
  • Hi,

    I have more than 12k items on Zotero, some with attachments some not. I started to storage the attachments on Zotero sync but is full. Now I storage on my local hd synced with Google drive. I wish to delete only the pdf +(not the items) on Zotero sync. Any suggestion?
    Ciao,

    Alessandro
  • Just disable file syncing in the Sync menu of Zotero preferences
  • Thank you bwiernik,

    but how can I delate only the pdf on Zotero storage?
    Viceversa if I upgrade the Zotero storage, how can I move Items and the linked files from Goggle drive to Zotero syncing?
  • There's a "Purge storage" function at the bottom of https://www.zotero.org/settings/storage?ref=usb -- but before you do that, could you clarify why you _want_ to delete the PDF on Zotero?

    (I thought there was a way to convert linked items to attached items quickly and in batch, but I can't find it right now @dstillman ?)
  • Thank you adamsmith.
    I'm trying to recover some space on Zotero sync, so I can upload some files to work on both the MacOs (computer) and iOS (iPad) versions of the pdfs.

    If it were possible to transfer the linked files from Google drive to Zotero sync, without losing the items' metadata, I could buy the necessary space on Zotero through the university where I work.

    But first I wish to test sync of the same file: Working on both, the MacOs and iOS version of Zotero.

    Ciao
  • I thought there was a way to convert linked items to attached items quickly and in batch, but I can't find it right now
    Tools → Manage Attachments → Convert Linked Files to Stored Files
  • Thank you very much
  • Hi, sbfellow. I think this exptension https://github.com/redleafnew/delitemwithatt will help you a lot.
  • I also want to delete all of the PDF files that are attached to my references. I hit the limit of 300 MB because I was accidentally syncing files. I've now deleted enough things one at a time that I'm below the limit, but I'd like to get rid of all of the 200 or so PDF files anyways.

    In 2018 fepegar said 'I searched "pdf", selected all with Ctrl + A, right clicked on a file and moved to trash.' If I do this with the regular search in Zotero, some items are included that are not PDF files, because they include 'pdf' somewhere. With Advanced Search I can search for 'Attachment File Type is PDF', and if I do Ctrl-A then it seems that all and only PDF files are selected, which is great. However, right-clicking on one of them doesn't do anything, and I can't find any way to delete anything from the Advanced Search dialogue.

    Am I missing something?

    Thanks.
  • First, note that you can just disable file syncing and don't need to delete local files at all (which seems very inconvenient to do!).
    But if you really want to, you can create a saved search from an advanced search and then use select all --> move to trash.
  • I have disabled file syncing. I don't use the attached PDF files at all, and in fact I forget they're there. I collect PDF files with a separate workflow that dates from before Zotero.

    Thanks for the tip about using a saved search. I'd seen that button but wasn't sure how to use it. Now I know. Thank you!

    The result of a search for 'Attachment File Type is PDF' is a list in which the source items and other kinds of attachments are greyed out and only the PDF files are not greyed out. This suggests, and you seem to imply, that selecting all and trashing will only trash the PDF files and not the source items themselves. Correct?

    The syntax 'Attachment File Type is PDF' seems to imply that the search would return all _items_ which have a PDF attachment, and not just the attachments themselves, in the same way that 'Tag contains ear' returns all items whose tags contain 'ear', not just the tags. These two different interpretations seem to be reflected in the existence of both 'Child Note' and 'Note' in the search syntax, which result in returning either the items themselves or the items' notes, respectively. These distinctions, and the significance of being greyed out, don't seem to be discussed at https://www.zotero.org/support/searching . Are they discussed somewhere else? (They seem to be hinted at in the sentence about 'Show only top-level items', but I haven't quite managed to digest the two conditions in that sentence yet.)

    I apologize for the length of this. Maybe most of it should be ignored. I got into a rabbit hole in trying to convince myself that I wouldn't be deleting a lot of my references.
  • These two different interpretations seem to be reflected in the existence of both 'Child Note' and 'Note' in the search syntax, which result in returning either the items themselves or the items' notes, respectively.
    If it said "Child Attachment File Type", it would be referring to the parent item. As is, it's referring to the attachment, the same as just "Note".

    "tag contains ear" isn't equivalent because the search only searches items. Tags are a property of items.
  • Just go to Groups > Your_group > Library settings > File Editing > No group file storage

    This deletes attachments but you keep the metadata.
Sign In or Register to comment.