I was just wondering how I can check what pacman hooks will be ran when I install or uninstall a package. Yesterday I got completely rid of snap-pac-grub, which also uninstalled snap-pac along with it, resulting in it deleting my snapper root configuration and all my snapshots of that partition.
While I luckily didn't suffer from any data loss, I'm still annoyed, since I only found out about these hooks when they started executing.
Can that be automated somehow? I mean yes, I can run pacman -Ql <package>, but if it removes more packages at once, this approach gets really tedious really quick.
Is there a dry-run mode that shows what packages would be removed by pacman -Rns <package>? I might need to automate that, but it should work without requiring sudo every time
Edit: Just noticed the Required by section in pacman -Qi - Gonna try to automate that