Created
July 16, 2022 23:01
-
-
Save amboxer21/5de6afb9e8cfc09108b2392c1a14bbdb to your computer and use it in GitHub Desktop.
A script to remove gentoo atoms that have no omitted version. Should prevent the system removing a package that has no alternative version.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# A script to remove gentoo atoms that have no omitted version. Should prevent the system removing a package that has no alternative version. | |
readarray -t pkg < <(emerge -av --pretend --quiet --depclean | awk '/^[a-z].*:\s[0-9].*/{if ($NF != "none") { gsub(":","-"); print $1$2 } }') | |
sudo emerge -av --unmerge $(echo ${pkg[*]}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment