Skip to content

Instantly share code, notes, and snippets.

View dhensen's full-sized avatar
🎯
Focusing

Dino Hensen dhensen

🎯
Focusing
View GitHub Profile
"""The following command checks which packages have a dependency on a given package checking through all packages even though not installed locally:
pacman -Sii nodejs-lts-gallium | grep "Req" | sed -e 's/Required By : //g'
This returns a string of packages separated by spaces and some prefix.
This script does the same thing but then in python and tells you which packages you currently have installed of those.
THis is inspired by getting "warning: removing 'nodejs' from target list because it conflicts with 'nodejs-lts-gallium'" why trying to run pacman -Syu today.
The warning does not help, it should tell me where the warning is coming from.
This script told me that apm was the culprit (turned out to be implicitly installed for atom) I dont use atom, so removed atom along with all its dependencies. problem solved.
@dhensen
dhensen / cleanup_nmcli_connections.sh
Created June 27, 2022 21:42
Remove all nmcli connections except one
nmcli -f name connection show | grep -Ev 'Tatooine5G|NAME' | sed -e 's/[[:space:]]*$//' | tr '\n' '\0' | xargs -0 -n1 nmcli connection delete