I am trying to write a non-interactive system update script.
Question:
if the following works well:
yes | dpkg --configure -a
will the following work also very well?:
yes | apt-get install --fix-broken
aptdpkgyes
I am trying to write a non-interactive system update script.
Question:
if the following works well:
yes | dpkg --configure -a
will the following work also very well?:
yes | apt-get install --fix-broken
Best Answer
You have
-y
or--yes
or--assume-yes
parameters inapt-get
.Try something like
Details:
The manual page of apt-get (You can also refer to manual page with
man apt-get
command) mentions:Contrary to this parameter, you also have
Edit
For Vlastimil's comment, I tried
And it works. The
--fix-broken
part of the command can be replaced with-f
and--assume-yes
with-y
or--yes
for convenience. This will not install any package in perticular but "can omit any packages to permit APT to deduce a likely solution", as mentioned on the manual page.