From f32e4cb64ec3bca313106e363d324559f5402232 Mon Sep 17 00:00:00 2001 From: Xiao Pan Date: Wed, 24 Dec 2025 18:05:11 +0800 Subject: paccache manually specify large pkg files to remove --- .../20-remove-all-uninstalled-and-large.conf | 12 ++++++++++++ .../system/paccache.service.d/20-remove-all-uninstalled.conf | 9 --------- 2 files changed, 12 insertions(+), 9 deletions(-) create mode 100644 etc/systemd/system/paccache.service.d/20-remove-all-uninstalled-and-large.conf delete mode 100644 etc/systemd/system/paccache.service.d/20-remove-all-uninstalled.conf (limited to 'etc/systemd/system') diff --git a/etc/systemd/system/paccache.service.d/20-remove-all-uninstalled-and-large.conf b/etc/systemd/system/paccache.service.d/20-remove-all-uninstalled-and-large.conf new file mode 100644 index 00000000..74e1005c --- /dev/null +++ b/etc/systemd/system/paccache.service.d/20-remove-all-uninstalled-and-large.conf @@ -0,0 +1,12 @@ +[Service] +# keep original `ExecStart=/usr/bin/paccache -r` while adding to the list +# because I want the default behavior and also remove all uninstalled pacman package cache +# maybe need `sudo systemctl daemon-reload` afterward +# if I want to clear the list first, I should do a line of `ExecStart=` first +# more about drop-in dir see `man systemd.unit`, more about ExecStart see `man systemd.service` +# https://wiki.archlinux.org/title/Systemd#Drop-in_files +# https://wiki.archlinux.org/title/Systemd#Examples +ExecStart=/usr/bin/paccache -ruk0 +# cuda pkg file is 2.3 GiB, texlive-doc is 2.9 GiB, texlive-fontsextra is 640 +# MiB, they are too large so I decided to remove them +ExecStart=/usr/bin/paccache -rk0 cuda texlive-doc texlive-fontsextra diff --git a/etc/systemd/system/paccache.service.d/20-remove-all-uninstalled.conf b/etc/systemd/system/paccache.service.d/20-remove-all-uninstalled.conf deleted file mode 100644 index 38d3c2d0..00000000 --- a/etc/systemd/system/paccache.service.d/20-remove-all-uninstalled.conf +++ /dev/null @@ -1,9 +0,0 @@ -[Service] -# keep original `ExecStart=/usr/bin/paccache -r` while adding to the list -# because I want the default behavior and also remove all uninstalled pacman package cache -# may need `sudo systemctl daemon-reload` afterward -# if I want to clear the list first, I should do a line of `ExecStart=` first -# more about drop-in dir see `man systemd.unit`, more about ExecStart see `man systemd.service` -# https://wiki.archlinux.org/title/Systemd#Drop-in_files -# https://wiki.archlinux.org/title/Systemd#Examples -ExecStart=/usr/bin/paccache -ruk0 -- cgit v1.2.3-70-g09d2