We can ensure that a list of packages is installed without unnecessary re-installs with `-S --needed`, i.e.
```console
# pacman -S --needed base
warning: base-3-2 is up to date -- skipping
there is nothing to do
```
But there's no way to ensure that a given list of packages is absent from the system regardless of whether they're installed, because `pacman -R` fails for packages which aren't installed:
```console
# pacman -R foo bar git
error: target not found: foo
error: target not found: bar
```
Could `pacman` get a `--needed`-like option for `-R` which removes packages which exist and warns about those not found?
This make automation around `pacman -R` a lot easier :slight_smile:
↧