Unlink Zotero from local hard drive (MAC)

Hello,

My Zotero account is syncing my documents to my Mac hard drive, occupying more than 50% of my hard drive memory. When I delete the document from my finder, it is also deleted from my Zotero.

I have Zotero Unlimited and I also sync (successfully) all of my files on my online Zotero. I have also turned my sync settings to download files "as needed."

Thanks for the help!
  • When I delete the document from my finder, it is also deleted from my Zotero.
    I don't think there's any way that can happen. Deleting files in your file system will not -- cannot possibly -- remove the attachment in Zotero. Can you test again?
  • I'm not clear what the actual question is here. I assume @spitouli means that deleting the file (from the 'storage' folder of the Zotero data directory) in Finder removes the file — not the attachment item — from Zotero. That would indeed be the case, and would be a way to free up local disk space when using "as needed" mode. But as long as the file has been uploaded to the online library and file syncing is enabled, double-clicking it in Zotero would then automatically download and open it.
  • It deletes the attached file from Zotero as well––even though the library and file are syncing.
  • You're not really engaging with what we've said. We've explained what it does and doesn't do. Beyond that, you'd have to say more. See Steps to Reproduce for the kind of description we need to help.
  • I am sorry if my explanation was not very clear, I am also trying to understand why this is happening. In simple terms, I want to delete the Zotero files which are locally stored on my Mac’s hard drive and appear to be mirroring those in Zotero, without losing the files from Zotero. In order to test this, I deleted one file which was locally stored on my Mac by clicking "Show in Finder," and the folder path was clearly linked to Zotero. That said, as soon as I clicked delete, the file appeared to be removed from Zotero as well. I am not sure if it was removed completely from the server, but it seems that whatever is stored locally on my hard drive, is linked to the cloud stored files in Zotero. Can I unlink those completely, and delete all the files that Zotero created locally on my hard drive?
  • edited November 1, 2024
    It's exactly as I say above — if you do Show in Finder and delete that file, it of course removes the file "in" Zotero in the sense that you just deleted the file that Zotero stored on disk. But it doesn't delete the attachment item that shows in the items list in Zotero, and it doesn't delete the file in your online Zotero library, so if you try to open the file again, Zotero will redownload it from your online library (as long as it was actually uploaded before you deleted it locally).
  • Zotero has created a folder in my directory called "Zotero" which contains a subfolder called "storage" that has >80 gb’s worth of documents that have been stored locally in my computer. I was prompted by my Mac to delete since my memory is maxed out because of this otherwise I wouldn’t have known this was happening. I tried deleting one file from the "storage" subfolder which incidentally was also deleted from the same directory in my Zotero app. So this validates my concern that Zotero is storing files locally on my hard drive and has given authority to my Mac when deleting these files and thus removes them from Zotero’s cloud storage too. This is the linkage I want to prevent so I can delete all those files from my Mac without removing them from Zotero. Is this possible?
  • No, you're still misunderstanding this. I can't really say this more clearly than I did above. Please re-read it.
  • edited November 1, 2024
    Thanks!
  • edited January 5, 2025
    -
  • edited January 5, 2025
    Hi mepeacock. Unfortunately, I have not figured it out yet. If I manage finding a solution, I will follow back.
  • dstillman is incorrect, by the way. As you said, if you delete a file on your local desktop, it also deletes it from the online library when it syncs. dstillman perhaps does not understand the question/concern.
  • @mepeacock: I wrote Zotero's sync code. I promise you I know how it works. If you're going to post here, we'd ask that you trust that we know what we're talking about.

    If you delete items within Zotero, those deletions will be synced to your online library. If you delete files on disk, they won't. If you're referring to the former, you've misunderstood what this thread is about. If you think the latter is happening, you're misunderstanding what you're seeing. As adamsmith said in your other thread, if you provide exact steps to reproduce, ideally with some screenshots, we can try to explain what you're seeing.

    @BobiS: You're also welcome to provide exact steps to reproduce plus screenshots, but there's no "solution" here, because Zotero doesn't do what you're saying it does.

  • https://s3.amazonaws.com/zotero.org/images/forums/u5603982/u54j9df6q564dc3r2dgo.png

    As per the attached screenshot, Zotero, at the time of writing this comment, is occupying 85GB on my hard drive. The same files also appear on the Zotero cloud and at the same time on my hard drive. Please see the second screenshot, which validates that Zotero is not syncing properly and maxing out my local storage.

    https://s3.amazonaws.com/zotero.org/images/forums/u5603982/w6o9kovyvn5x4p9ccgi4.png

    Finally, please see attached also the total usage on my Zotero cloud (I have the unlimited plan).
    https://s3.amazonaws.com/zotero.org/images/forums/u5603982/6vibemumxdfv8yc4m07h.png

    Screenshot also of the sync settings to download files "as needed."
    https://s3.amazonaws.com/zotero.org/images/forums/u5603982/302zds1kgra8tapt0ppw.png
  • edited February 14, 2025
    @dstilman, you said, "If you delete items within Zotero, those deletions will be synced to your online library. If you delete files on disk, they won't." I get that.

    But in the 2nd screenshot above, is it a folder of 'files on disk' or is it the 'items within Zotero' that are saved on the computer's hard drive?

    I understand that it is the Zotero Data Directory, and that it's not in the Zotero interface/app, but I don't understand computer architecture, so I don't know if these (Directory & app) are the same, linked, or separate.

    Sorry if my question is stupid, but I'm trying to understand the thread above.
  • The second screenshot shows files on disk saved under a folder titled as Zotero, created by Zotero on my disk and linked to the Zotero app and all documents (pdf, etc.)--very similar to the first screenshot. Pretty much, whatever file I add on my Zotero desktop it syncs to my online zotero library, but it is also saved in this folder. What I would like to do is to not have these files stored locally on my hard drive because they take so much space (this is precisely the reason why I got the unlimited subscription).

    I am also not an expert, and I am trying to figure this out, but I have been quite unsuccessful with this whole process.

    Is the same thing happening to you as well?

    My question is: Does the "unlimited subscription" support unlimited cloud storage (like Google Drive or Dropbox), where files could be accessed online without taking up local space? Or Zotero's syncing system is designed for backup and accessibility rather than acting as a purely cloud-based file system? If Zotero doesn't support this use case, is there an alternative to not save files locally?
  • edited February 14, 2025
    Right, so this is just a misunderstanding.

    Your Zotero is working correctly. Zotero is a local-first app. If you save something to the app, the data gets saved to your local database and the attachment file gets saved to your disk. If you're using syncing, Zotero will also upload the data and files to the cloud, but that has no effect on what's stored locally.

    The setting in your screenshot is called "Download files" for a reason — it's talking about files that are already in the online library and not on your local computer. Zotero can either download all files during syncing, or it can download them when you try to open them if they don't already exist locally. But files you've saved on this computer are always going to be on this computer.

    In a future version, we'll be offering a feature that will let you control how long to keep local copies of files that have been uploaded in order to limit local disk usage, but that doesn't exist yet.

    For now, if all your files are all online, you can use right-click → Show File and delete individual files, or you can search for all PDFs in your data directory and delete them, and then Zotero will re-download them as needed. Or you can wait for the feature I describe above, which will do that automatically (and only do so after confirming that the files have uploaded).

    And just to repeat one more time, deleting files on disk will absolutely not affect what's in Zotero or in the online library. (You do need to wait a few seconds for the file to be uploaded, though. If you delete it immediately before syncing finishes, there wouldn't be anything to upload.)
  • edited February 14, 2025
    (You're also misstating how Google Drive and Dropbox work. The standard behavior of those and similar tools is to sync a local folder with cloud storage. If you delete a file in your local Dropbox folder, it's deleted from the cloud as well. Those tools have various special settings to mark files as "online only" or to select specific folders that shouldn't be synced to a given computer, but that's not the default behavior. "unlimited cloud storage" does not in any way imply that files aren't also stored locally — you have to go out of your way to set that up. Zotero's "download files as needed" option is similar to that, except there's not yet any way of marking something as "online only" other than by deleting it manually in the filesystem.)
  • edited February 14, 2025
    [Regarding Dropbox and Google Drive, I do see lots more people (particularly if they started using those services recently) having them set up in download-files-only-when-requested ("streaming") mode*. So I think more people than earlier probably now think of that as the default way those cloud services operate, even if those services did not have that capability initially. I started using Dropbox and Google Drive very early on and have never used them that way (everything is "mirrored").

    Indeed Google nows says "most users choose streaming as a way to work with their Google Drive files on their computer." ...
    https://support.google.com/drive/answer/13401938?hl=en

    *for example it comes up from time to time around here for linked file setups using cloud services, which commonly (?) seem to cause Zotero to fail to open linked PDFs when those services are set up in streaming mode.]
  • @tim820: Yeah, it looks like a bunch of services now default to online-only (surprising a lot of long-time users!), so that might explain some of the confusion.

    (This is unrelated to the initial claim that deleting a file outside of Zotero deletes it within Zotero. That's just not the case.)
Sign In or Register to comment.