To avoid any "failed to execute command" errors when no orphans are found, use the following command for .
However pacman does not offer the possibility to keep a number of past versions and is therefore more aggressive than paccache default options.
Each repository section allows defining the list of its mirrors directly or in a dedicated external file through the This is happening because pacman has detected a file conflict, and by design, will not overwrite files for you. If the file is owned by another package, file a bug report.
Running non-interactively is very risky since you might end up overwriting an important file.
Also take care to extract packages in the correct order (i.e. This forum post contains an example of this process where only a couple pacman dependencies are broken.
This prevents another instance of pacman from trying to alter the package database at the same time.
If pacman is interrupted while changing the database, this stale lock file can remain.