On an Debian/Ubuntu-based system, to install texlive-full
without docs and language packs, simply do this:
sudo apt install `sudo apt --assume-no install texlive-full | \
awk '/The following additional packages will be installed/{f=1;next} /Suggested packages/{f=0} f' | \
tr ' ' '\n' | grep -vP 'doc$' | grep -vP 'texlive-lang' | grep -vP 'latex-cjk' | tr '\n' ' '`
After this, if you wish to install the language packs, selectively install them. E.g.:
sudo apt install texlive-lang-english texlive-lang-european texlive-lang-french texlive-lang-german
To install LaTeX on Linux systems, there is the texlive-full
package which occupies more than 6GB space. If you install the minimal LaTeX (with some recommended packages installed), it can occupy somewhere between 500MB to 1GB space, but it's pretty unusable and you will perpetually be installing packages in future.
So, it has become customary to install the texlive-full
package because it's the most hassle-free solution. But we can prune out some of the beef that may not be essential for many people, especially if you are short on space. There are 2 sets of packages which can be avoided from the installation without losing out on anything crucial (depending on your use-case):
- Docs Packages (occupy around 2GB space) : e.g.
texlive-fonts-extra-doc
- Language/Fonts Packages (occupy around 1GB space) :
- general language packages : e.g.
texlive-lang-french
latex-cjk-all
: the Chinese-Japanese-Korean language and fonts metapackage
- general language packages : e.g.
Now, texlive-full
is a metapackage which installs about 286 packages. To selectively remove the docs and/or the language packages, we can first extract the list of packages that texlive-full
installs using apt
and then filter out the docs and/or the language packs using the following command:
#Remove the grep section for docs and/or language packs as per your preference
sudo apt install `sudo apt --assume-no install texlive-full | \
awk '/The following additional packages will be installed/{f=1;next} /Suggested packages/{f=0} f' | \
tr ' ' '\n' | \
grep -vP 'doc$' | \
grep -vP 'texlive-lang' | \
grep -vP 'latex-cjk' | \
tr '\n' ' '`
After this, install the language packs of your choice:
sudo apt install texlive-lang-english texlive-lang-european
I did a comparison of the various download and installation sizes scenario:
Package | Download Size | Install Size |
---|---|---|
texlive-full | 3135 MB | 6423 MB |
texlive-full without Docs | 1760 MB | 4653 MB |
texlive-full without Docs, Lang Packs and CJK Packs | 1249 MB | 3554 MB |
texlive-minimal (with some recommended packages) | 200 MB | 929 MB |
- https://tex.stackexchange.com/questions/134365/installation-of-texlive-full-on-ubuntu-12-04
- https://tex.stackexchange.com/questions/397174/minimal-texlive-installation
- https://askubuntu.com/questions/129566/remove-documentation-to-save-hard-drive-space
- https://tex.stackexchange.com/questions/245982/differences-between-texlive-packages-in-linux