I find that many apps use different versions of Electron, and I'm left with residual Electron versions no longer used.
sudo pacman -Qqtd | grep electron | sudo pacman -Rs -Sometimes this is useful for removing a source-build package and replacing it with a prebuilt binary package, e.g. for Qt libraries.
Caution this is hazardous. You should directly review all packages before removing them, to ensure you're not removing critical dependencies.
Review all packages who were once installed as dependencies but no longer required by another package.
sudo pacman -Qqtd | lessBefore removing all orphaned packages (below), do check that you're not removing a critical build dependency (e.g. cmake) that will prevent you from building and installing packages you need.
sudo pacman -Qqtd | sudo pacman -Rs -You can determine which other packages would be affected by removal of a package as well.
for i in electron electron31 electron27 ; do sudo pacman -Sii ${i} ; done | lessPerhaps easier is to find only the impacted packages from a set:
sudo pacman -Qqtd | grep electron | sudo pacman -Sii - | grep "Required By"Find all packages on the system who have some missing dependencies.
sudo pacman -Qq | sudo xargs -L 1 pacman -T | lessYou can resolve their dependencies by reinstalling the affected packages.
You may be retaining several gigabytes of older package versions in your local cache. Sometimes cleaning that is helpful.
sudo pacman -ScPacman will also clean the cache automatically after every upgrade if you want...
sudo pacman -SyucIdeally you'd remove backages you no longer need, and let Pacman prune orphaned packages at the same time, as well as all packages that depend on whatever you specifically removed.
Caution is warranted, as you'd best review the removed packages to avoid removing something you needed by accident.
sudo pacman -Rcsu _packagename_Replace the "myquery" with whatever you want to search for. In my current case, I'm removing all libretro libraries/components/etc.
Note This removes the list of packages without asking for confirmation.
You should review the list first (dropping the last sudo xargs segment of the command).
SEARCH="myquery"
sudo pacman -Q | grep -F -f <(sudo pacman -Sp "${SEARCH:-NONE}" --print-format "%n") | awk '{print $1}' | sudo xargs pacman -Rcu --noconfirmsudo find /usr/share/icons -maxdepth 1 -type d -exec gtk4-update-icon-cache -f {} \; -exec gtk-update-icon-cache -f {} \;