Skip to content

Conversation

@k8ieone
Copy link

@k8ieone k8ieone commented Nov 7, 2025

This hook removes the pacman cache after each pacman transaction, removing the need to run pacman -S --clean --noconfirm after installing packages.

@tulilirockz
Copy link
Member

What concerns me is that I'd like to not break downstream workflows, do we need to do this?

@k8ieone
Copy link
Author

k8ieone commented Nov 10, 2025

No, not really. I've just seen this used around on e.g. https://github.com/lopsided98/archlinux-docker/blob/master/rootfs/common/usr/share/libalpm/hooks/package-cleanup.hook

If you're going to be cleaning the packages after each install to save space using pacman -S --clean --noconfirm it makes sense to me to automate things imo.

Is there any situation where you'd want to keep the cached packages?

@tulilirockz
Copy link
Member

Honestly, no idea 😆 - I'd just imagine that this might be an issue somehow for downstreams as this kind of stuff always kind of breaks things later.

@k8ieone
Copy link
Author

k8ieone commented Nov 10, 2025

Ah, okay 😄

I mean we can either keep this open or just close it and keep it in the "archive", maybe add it in at some point. To me it just seemed like an easy improvement to do but I haven't really thought about the possible consequences of doing this automatically 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants