Package: dpkg Version: 1.22.22 Severity: wishlist The following mostly works as non-root, and can be useful for checking the alternatives without necessarily repairing them:
yes '' | update-alternatives --all An exception is if update-alternatives encounters a dangling link; then it exits with an error since it doesn't have permission to fix the problem. It would be more useful to let it check the remaining configurations. To reproduce, one needs a system with a broken alternative. For example one where package python3-jsonschema has been upgraded from before version 3.0.2-1 (which dropped Python 2 support). Then one gets output along the lines of: [... normal output for alternatives that sort before jsonschema ...] Press <enter> to keep the current choice[*], or type selection number: update-alternatives: warning: /etc/alternatives/jsonschema is dangling; it will be updated with best choice There is no program which provides jsonschema. Nothing to configure. update-alternatives: error: unable to remove '/etc/alternatives/jsonschema': Permission denied and update-alternatives exits with code 2 instead of continuing.

