10

I recently made a small app that I had issues with. I'm pretty sure it ended up being because of all the curated data to load. My problem now is that under the Windows 8.1 folder Users/Username/AppData/Roaming/Mathematica/Paclets/Temporary, there is 10GB of "GraphData" files. I have a small SSD and I need to get rid of this stuff. Now I'm assuming I can probably delete it, but I thought I'd ask if there's a proper way to delete this stuff (like a certain command or something). And finally, is there a way of preventing Mathematica from downloading so much data onto my computer, or at least deleting it once I'm done with it? That one day I loaded up my app, I lost 10 GB over the course of a couple hours.

The real question here is: why does Mathematica generate a rather large folder of data from the use of one notebook, and not clear it somehow afterwards? Is there a way of configuring how much temporary curated data is stored on your computer? Is there a way of clearing it without actually deleting the contents of the folder?

Sultan of Swing
  • 913
  • 1
  • 6
  • 19
  • Are these in the Paclets/Repository directory or the Paclets/Temporary directory? – Mr.Wizard Oct 26 '14 at 08:51
  • Oh sorry, I forgot to mention that. 9.3 GB are in the Paclets/Temporary folder, 400 MB in the Paclets/Repository folder. – Sultan of Swing Oct 27 '14 at 00:38
  • @Mr.Wizard, would it be safe to delete the contents of the Paclets/Temporary folder? I'm really running low on space and could really use that 10GB right about now. What about the Paclets/Repository as well? – Sultan of Swing Oct 30 '14 at 09:40
  • Unfortunately I cannot speak from experience. I would guess that a the contents of a folder named Temporary could be deleted while the program is not running without being destructive however I can give you no assurance of that. It is also unfortunate that your question has not attracted an answer yet. – Mr.Wizard Oct 30 '14 at 09:57
  • To be honest I don't think it will get an answer. It's not so much "can I delete this folder", but more "why is Mathematica taking up so much space (10 GB) for one block of code that I made, and not deleting it when it's done?" I know it's all from the one notebook because every file in that folder starts with the word GraphData, which was what I was using in that notebook. I think I'll just shoot first and ask questions later. – Sultan of Swing Oct 30 '14 at 10:00
  • For what it's worth that single up-vote is mine; I find it an interesting question though I haven't tried to explore it. Really this kind of resource management should be transparent and user-configurable. – Mr.Wizard Oct 30 '14 at 10:07
  • I think this thread is closely related: http://mathematica.stackexchange.com/q/61333/280 From my experience, it is absolutely safe to delete the contents of the Temporary directory. – Alexey Popkov Oct 30 '14 at 10:52
  • 1
    Tangentially related Wolfram Support article: "How do I transfer paclet data to an offline computer?" – Alexey Popkov Nov 02 '14 at 06:46

1 Answers1

3

Late to the party: I found this question today while testing out how to apply time constraints to functions accessing curated data (How to set the timeout value for *Data functions).

In order to test a function accessing curated data, I had to clear the cached data on my computer, so I could reproduce the conditions of a first access and the accompanying long loading times. I was trying to figure out whether there is a nice programmatic way to flush local data for a particular repository. I couldn't find any, but I found this question.

In my case, the data was associated with WeatherData results, and it was residing in folders name WeatherData*, and CityData*. It had been generated from evaluation of the following expression:

WeatherData["Chicago", "Temperature", {1950, 1}]

Eventually, I just decided to test out what would happen if I simply deleted the data while Mathematica was running. For what it's worth, I'm on MMA v. 10.1 on Win7-64bit, also on an SSD.

The results were very benign:

  • the WeatherData folders could be deleted just fine, but the CityData* folder could not, indicating to me that Mathematica had those files open at the time.
  • I then Quit[] the kernel from the front end; I could then delete the remaining CityData* folders.
  • Restarting the kernel and evaluating the same expression re-downloaded the data and re-generated the indices with no complaints.

Of course this is little more than a commentary to the OP's main question regarding transparent management of downloaded data. That part is still wide open, but I don't think that mere users can answer that one without insight from WRI...

MarcoB
  • 67,153
  • 18
  • 91
  • 189