Force apt-get to prompt yes/no

apt

Is there a way to force apt-get to display yes/no prompt? A --force-yes option exists, but there seems to be no --force-prompt or similar option. If you attempt to install a package that has all dependencies already installed, it will begin installation without displaying a yes/no prompt. This can be bothersome if you want to review whether dependencies exist and which ones will be installed because you don't know if the potential dependencies are installed ahead of time.

NOTE: When does “apt-get install” ask me to confirm whether I want to continue or not? is somewhat related in that it describes under what standard conditions the prompt is displayed. I'm interested to know how to force it though.

Best Answer

There's just no way to do this with the current implementation of apt-get, you would need to open a feature request and appeal to the maintainer. The current behavior of apt-get is that when the list of packages you implicitly declared to be installed is equal to the amount of packages that will get installed, and no other packages are affected with upgrades or breaks, apt-get presumes the user already is sure of what is going to be done, if you are not sure or want to analyze what will be done without actually installing the package, you can use Costas recommendation of -s, --simulate, --just-print, --dry-run, --recon, --no-act.

There are other tools like apt-listbugs that would analyze the versions of packages to be installed before you actually install them (in this case for bugs) and warn you.