19
$\begingroup$

I'm currently running Mathematica, but I'm looking into using Mathematica on our machines that do not have a lot of space. Mathematica is quite large however. Is there a way to install only certain sub-packages?

I saw that the Documentation directory is already 5+ GB, I assume we can delete that as a start? But still I see some MXNet integration files that are around 0.5GB.

  • Is there a way to select what parts of Mathematica I would like to install?

  • If not, how safe is it to delete any files?

  • Are there any alternative installations that will use less space?

$\endgroup$
4
  • 2
    $\begingroup$ Basically, no. Mathematica is not particularly modular, and if you start removing things, you will very likely break it. As for the documentation, see mathematica.stackexchange.com/q/81250/12 Something else you may consider: use file system compression. This saved me about half the space on OS X. $\endgroup$
    – Szabolcs
    Commented May 29, 2018 at 14:50
  • $\begingroup$ One thing to pay attention to is $UserBaseDirectory/Paclets/Repository. Components that are not needed by everyone are automatically downloaded to here on first use. A few of these can be very large. E.g. the CUDAResources one is 1.5 GB on my machine. If you've accidentally downloaded something large, I think it would be okay to delete it form there. $\endgroup$
    – Szabolcs
    Commented May 29, 2018 at 15:00
  • $\begingroup$ I'm voting to reopen because this question generated two well received answers and has the possibility of a healthy competition for the lightest running version of Wolfram Mathematica. I think this question contributes more been open that closed. $\endgroup$
    – rhermans
    Commented May 30, 2018 at 8:10
  • $\begingroup$ @rhermans Okay, I second that. This is becoming a performance comparison of a different kind. $\endgroup$ Commented May 30, 2018 at 8:32

2 Answers 2

16
$\begingroup$

Before this gets closed, I want to give an up-to-date opinion. The linked Q&A is 6 years old which is ages when it comes down to memory. To answer your questions

  • Is there a way to select what parts of Mathematica I would like to install?
  • If not, how safe is it to delete any files?
  • Are there any alternative installations that will use less space?

No, for the desktop Mathematica there is no way to de-select some install components. No, in general, it is not safe to delete anything, although some ideas from the linked Q&A can be followed. The question about alternatives was answered by rhermans.

My 11.3 installation on Linux needs 9.6GB, but you have to put this into the perspective of today's memory requirements. My browser cache contains at this moment about 1GB of data. My sources of Jetbrains IDEA (this is really only the repository) is 15GB of data. My installation of Battlefield 1 and 4 is 80 GB each. Finally, my current research project contains scans that need 250GB.

I don't want to say that you shouldn't be concerned about saving memory, but maybe it's better to backup some old files and leave the Mathematica installation intact. SSD HDD memory is currently available at about 20 Cent per GB. That means, where I live (!), the space for a Mathematica installation costs me about the same as one loaf of bread.

Finally, to give you a practical tip: It was pointed out that the documentation use very much memory. I have never tested if hell breaks loose if you delete the documentation, but maybe you want to try this out. A better solution would be to delete only the output cells, but I wouldn't know how to automate this for all documenation pages.

When I see this correct, then the Documentation directory in the installation path uses 5.1GB. However, there is more. Under SystemFiles/Components, each directory contains a documentation path as well. These add up to 2.1GB. Therefore, it is safe to say that a very large portion of the Mathematica installation is just documentation.

I do not recommend to delete these directories, but it would be interesting to see if Mathematica would start at all.

Update

OK, good news. I crippled my 11.1 Mathematica to the bare minimum. I removed

  • all Documentation
  • all binaries and libraries with the Linux and Windows architecture (I'm on Linux-x86-64)

This took me with a shell about 3 minutes and as you can see

img

Mathematica is still functional. Even if you open a help-page nothing explodes. You simply get the warning message or the documentation search page.

Now, you certainly want to know how much I memory I could save :)

I'm now down to 2.8GB for the whole installation

$\endgroup$
3
  • $\begingroup$ Nice! Probably we should reopen the question and see if somebody can beat the 2.8GB mark. $\endgroup$
    – rhermans
    Commented May 30, 2018 at 8:01
  • 1
    $\begingroup$ There is still some margin. Most of the space is occupied by the dynamic libraries that I didn't dare to touch, but I'm sure many of the converters can be removed as well if you don't need them. $\endgroup$
    – halirutan
    Commented May 30, 2018 at 8:06
  • $\begingroup$ This is great, thank you so much! I'm also investigating using the raspberri pi wolfram-engine to see how much functionality we lose and possible performance reduction. $\endgroup$
    – Joe
    Commented May 30, 2018 at 8:29
8
$\begingroup$

The part about deleting files was answered already here and now in the extraordinary post by @halirutan, so I will focus on alternative installations.

There are three alternatives I can see that would allow you to have lighter version of Wolfram Language.

Older versions

In the linked answer the OP quotes

Mathematica 8 for Linux takes more than 3GB

Older version would be even lighter.

gridMathematica

If you install for instance gridMathematica there is no documentation and the SystemFiles folder is lighter. It totals around 4.1 GB.

Raspberry Pi

Not a full Mathematica, but a workable form of Wolfram Language is the wolfram-engine for Raspberry Pi which is only around 460 MB.

enter image description here

$\endgroup$
1
  • 1
    $\begingroup$ Great, I already came across the wolfram-engine on the Pi and we are now looking into what kind of functionality we might lose and performance hits we take. $\endgroup$
    – Joe
    Commented May 30, 2018 at 8:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.