From e958e204315d6575fc2f48301e053c4453aa4dee Mon Sep 17 00:00:00 2001 From: David Young Date: Sat, 7 Nov 2026 13:31:09 -0700 Subject: [PATCH] Remove texlive from the install, with a migration for existing machines Nothing in CoreDesktop uses LaTeX, and the texlive group is 22 packages and about 3 GB. The migration removes it once, keeping any package from the group that something else still needs as a dependency. Co-Authored-By: Claude Opus 5.5 --- migrations/1794082157.sh | 20 ++++++++++++++++++++ packages.conf | 1 - 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 migrations/1794082157.sh diff --git a/migrations/1794082157.sh b/migrations/1794082157.sh new file mode 100644 index 0000000..6cbfd70 --- /dev/null +++ b/migrations/1794082157.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +# CoreDesktop installed the whole texlive group (22 packages, about 3 GB), +# though nothing in it uses LaTeX. Remove it once. A package from the group +# that something else still needs stays, marked as a dependency, to go with +# that as an orphan. +mapfile -t pkgs < <(pacman -Qgq texlive 2> /dev/null) +(( ${#pkgs[@]} )) || exit 0 + +sudo pacman -D --asdeps "${pkgs[@]}" > /dev/null || exit + +# The ones nothing needs now (-tt counts packages only optionally needed). +# Removing them with -s takes the rest of the group, and the dependencies it +# pulled in, unless something else needs them. +mapfile -t unneeded < <(comm -12 <(printf '%s\n' "${pkgs[@]}" | sort) \ + <(pacman -Qqdtt | sort)) +(( ${#unneeded[@]} )) || exit 0 + +echo "Removing texlive..." +sudo pacman -Rns --noconfirm "${unneeded[@]}" diff --git a/packages.conf b/packages.conf index 591be65..077c18f 100644 --- a/packages.conf +++ b/packages.conf @@ -94,7 +94,6 @@ DEV_TOOLS=( python-pygments rust starship - texlive tmux # nvim-treesitter builds its language parsers with the tree-sitter command tree-sitter-cli