How to set a default option for dpkg --configure -a?
12,171
That's a job for yes
, if you always want the answer N:
yes N | dpkg --configure -a
Or Y (works without an argument):
yes | dpkg --configure -a
Or over the dpkg
options, see dpkg --force-help
:
[...]
[!] confnew Always use the new config files, don't prompt
[!] confold Always use the old config files, don't prompt
[!] confdef Use the default option for new config files if one
is available, don't prompt. If no default can be found,
you will be prompted unless one of the confold or
confnew options is also given
[...]
Use then (for example):
dpkg --configure -a --force-confnew
Related videos on Youtube
![Adrian B](https://i.stack.imgur.com/6EYXi.jpg?s=256&g=1)
Author by
Adrian B
Updated on September 18, 2022Comments
-
Adrian B almost 2 years
How can I send a command like following, but with default parameters (without user input). I want to use this in a shell script.
dpkg --configure -a ... ==> Modified (by you or by a script) since installation. ==> Package distributor has shipped an updated version. What would you like to do about it ? Your options are: Y or I : install the package maintainer's version N or O : keep your currently-installed version D : show the differences between the versions Z : start a shell to examine the situation The default action is to keep your current version. *** CONFIGFILE (Y/I/N/O/D/Z) [default=N] ? ^C
-
Cbhihe almost 9 yearsNot quite sure I understand yr question well. Do you just want to just configure all unpacked but yet to be configured packages on yr box ? If so just add an alias in yr
.bashrc
or.bash_aliases
file. E.g.alias confpack='dpkg --configure -a' . After you source yr
.bashrc` fileconfpack
would then become yr new shortcut cmd. Sorry if I got yr question wrong.
-