Why can't TeX Live's size be reduced?
As you can see from
$ du -sch /usr/local/texlive/2012/texmf-dist/* | sort -hr
3,8G insgesamt
1,5G /usr/local/texlive/2012/texmf-dist/doc
1,4G /usr/local/texlive/2012/texmf-dist/fonts
726M /usr/local/texlive/2012/texmf-dist/source
218M /usr/local/texlive/2012/texmf-dist/tex
22M /usr/local/texlive/2012/texmf-dist/tex4ht
16M /usr/local/texlive/2012/texmf-dist/bibtex
11M /usr/local/texlive/2012/texmf-dist/scripts
6,6M /usr/local/texlive/2012/texmf-dist/dvips
3,9M /usr/local/texlive/2012/texmf-dist/metapost
2,1M /usr/local/texlive/2012/texmf-dist/omega
1,9M /usr/local/texlive/2012/texmf-dist/ls-R
1008K /usr/local/texlive/2012/texmf-dist/context
444K /usr/local/texlive/2012/texmf-dist/metafont
308K /usr/local/texlive/2012/texmf-dist/makeindex
256K /usr/local/texlive/2012/texmf-dist/pbibtex
48K /usr/local/texlive/2012/texmf-dist/texdoctk
36K /usr/local/texlive/2012/texmf-dist/mft
20K /usr/local/texlive/2012/texmf-dist/texdoc
12K /usr/local/texlive/2012/texmf-dist/web2c
the major part is documentation and fonts. If you are satisfied with a single font and without documentation, the distribution can be much smaller. There were several attempts to create such a minimalistic distribution, but I'm not sure if they are still available (edit: I just rediscovered one: grailtex).
And as daleif stated in his comment, you can install a much smaller TeX Live as well.
As real overhead, maybe the source
directory counts, which is also quite large. It consists of sources of most of the stuff in the other directories such as LaTeX packages etc. But this is rather a political than a technical question, therefore I leave it to the TeX Live people to answer it (IIRC they already answered it, maybe on the TeX Live mailing list).
[Slightly tangential but perhaps useful.] The LaTeX3 team have recently set up an automated test system which needs to install 'just enough' TeX Live to work. That's done using a script but the key ideas are
- Install only the minimal scheme (so
install-tl -scheme scheme-minimal
) - Deselect installation of sources and documentation
- Add on only a minimum of required packages after installation
For us, this is wrapped up using a profile inside the script:
wget http://mirror.ctan.org/systems/texlive/tlnet/install-tl-unx.tar.gz
tar -xzf install-tl-unx.tar.gz
cd install-tl-20*
# Set up the automated install
cat << EOF >> texlive.profile
selected_scheme scheme-minimal
TEXDIR /tmp/texlive
TEXMFCONFIG ~/.texlive2015/texmf-config
TEXMFHOME ~/texmf
TEXMFLOCAL /tmp/texlive/texmf-local
TEXMFSYSCONFIG /tmp/texlive/texmf-config
TEXMFSYSVAR /tmp/texlive/texmf-var
TEXMFVAR ~/.texlive2015/texmf-var
option_doc 0
option_src 0
EOF
./install-tl --profile=./texlive.profile
export PATH=/tmp/texlive/bin/x86_64-linux:$PATH
# Core requirements for the test system
tlmgr install babel babel-english latex latex-bin latex-fonts latexconfig xetex
You might notice we install without sudo
(due to the set up of the automation) and as we don't know the user name for the installation we put it somewhere reliable and writeable (/tmp
): that would obviously be different in a 'production' system. The above installation is less than 25 Mb to download and the installation is small (under 200 Mb). We are aiming more to minimise download size than disk use, but this gives some idea of what is possible. (For example, the minimal scheme installs BibTeX and MakeIndex, which we don't need but there is no point in removing for us. To reduce disk use even more one could uninstall those after the initial installation, again something that could be scripted.)
Update: there is now a scheme infra-only
which installs only enough stuff to allow tlmgr
to work. This is there for specialist cases such as test rigs, and doesn't include TeX itself! If you really want a small system, starting from there and adding packages is the way to go at the cost of a tricky time working out what to install.
You can install a much more minimalistic texlive using profiles. Have a look at this install script I use in my github repo. I have this install just the packages I need to build the PDFs using travis-ci:
https://github.com/BPA-CSIRO-Workshops/handout-template/blob/master/developers/texlive_install.sh
The profile file is in the same directory.