3 ms·
Here's a handy one. It lists packages that are both explicitly installed (and therefore won't be removed unless you remove them yourself), but are also needed b
by nly 11y ago
Here's a handy one. It lists packages that are both explicitly installed (and therefore won't be removed unless you remove them yourself), but are also needed by other packages.
comm -23 <(pacman -Qqe | sort -u) <(pacman -Qqet | sort -u)
And here's a more practical version that ignores the base and base-devel group (I don't know why package maintainers keep adding things in base like glibc as direct dependencies, but they do)
comm -23 <(comm -23 <(pacman -Qqe | sort -u) <(pacman -Qqet | sort -u)) <(pacman -Qqg base-devel base | sort -u)
Unless you have a personal reason to explicitly keep these packages, they usually need to be marked as dependencies again so that, when you remove the things that depend on them with -Rs, they'll be removed as well.
pacman -D --asdep packagename
If you want to know what depends on each of these packages run
pactree -r packagename
Sorting this out should eliminate the need to ever resort to a -Rc (--cascade) removal, which is dangerous.
- ackalker 11y agoThose are some very useful oneliners, thanks! :) Please consider adding them to the Arch Wiki (if they're not already on it).