I use TinyTeX, it was developed for R but works nicely for other purposes.
Management is done by command-line using tlmgr as usual, and the profile file is easy to understand and adjust:
TinyTeX is a custom (and probably opinionated) LaTeX distribution
based on TeX Live that is small in size but still functions well in
most cases. Even if you run into the problem of missing LaTeX
packages, it should be super clear to you what you need to do. You
only install LaTeX packages you actually need. The manual should be at
most two pages long.
Please note that TinyTeX assumes that you are not afraid of using the
command line... In fact, there is only one single command that you need to
know: tlmgr. It is probably not too scary.
TinyTeX only provides an installation script that downloads and
installs TeX Live over the network. It may take a couple of minutes,
depending on your network speed...
For Linux users, TinyTeX will be installed to $HOME/.TinyTeX and
symlinks of executables (such as pdflatex) are created under
$HOME/bin, which should be on the PATH environment variable:
wget -qO- \
To uninstall TinyTeX, simply delete the folder from your file
manager/browser, or use command line:
# Linux tlmgr path remove
rm -r "~/.TinyTeX"
Compare the way to uninstall TinyTeX with the ways to uninstall other LaTeX > distributions, and you may appreciate how much simpler it is to get rid of
TinyTeX than other LaTeX distributions. That is because TinyTeX is just a
Edit: @cfr asked how does it work in a multi-user scenario
There are three options, the simple "everyone uses it but only root installs news packages", the complicated "create a tinytex user group and chmod it" and the reasonable "each user may have his local package tree". Questions 7 and 8 on the official FAQ describe it:
1 - Download and prepare a fully portable distro without root:
wget -qO- \
"https://github.com/yihui/tinytex/raw/master/tools/install-unx.sh" | \
sh -s - --admin --no-path
2 - Set symlinks and permissions as root
sudo ~/.TinyTeX/bin/*/tlmgr path add
chown -R root:staff ~/.TinyTeX
chmod -R g+w ~/.TinyTeX
chmod -R g+wx ~/.TinyTeX/bin
3 - Each user initializes its own package tree
4 - Users run
tlmgr using the
--usermode switch to install whatever package they need
tlmgr --usermode install koma-script xcolor
Adjusting these commands to specific sysadmin scenarios should be trivial after a couple minutes of pondering.
Questions 9 and 16 of the FAQ deal with Debian-based package managers\repos\PPAs and with macOS respectively, and are worth a read too.
Second Edit: Just noticed TinyTeX's Hall of Pain...
includes at least three references to the "TeXlive too big for Docker container, MikTeX too esoteric for life" situation: https://yihui.name/tinytex/pain/
A testimonial that mentions files sizes:
Removed TeX Live from my system (openSUSE): 1.5gb. Installed TinyTeX +
the dependencies to compile my thesis: 150mb!!!! This is great! —