-
-
Save bse666/3ac975bad65d320d0d19f840241d1384 to your computer and use it in GitHub Desktop.
# https://askubuntu.com/questions/250733/can-i-do-a-silent-or-unattended-release-upgrade | |
# The following command upgrades to the new stable release without prompts: | |
do-release-upgrade -f DistUpgradeViewNonInteractive | |
# The following command upgrades to the current development release without prompts: | |
do-release-upgrade -d -f DistUpgradeViewNonInteractive | |
# Really Unattended | |
## --force-confdef: ask dpkg to decide alone when it can and prompt otherwise. | |
## --force-confold: do not modify the current configuration file, the new version is installed with a .dpkg-dist suffix. | |
# create file /etc/apt/apt.conf.d/local | |
Dpkg::Options { "--force-confdef"; "--force-confold"; } |
Yes, i also ran into that recently.
The newer Ubuntu Versions have this "issue" with the default Config overwrites.
Older Versions could run this unattended.
But i found a solution.
You have to make it out for yourself if you want to test this.
I would make backups of etc. before Upgrade to test this out.
This solution worked for me to upgrade Ubuntu 20.04 to 22.04, so thanks a log @bse666 !
# Really Unattended
## --force-confdef: ask dpkg to decide alone when it can and prompt otherwise.
## --force-confold: do not modify the current configuration file, the new version is installed with a .dpkg-dist suffix.
# create file /etc/apt/apt.conf.d/local <<< here's the key!
Dpkg::Options { "--force-confdef"; "--force-confold"; }
I've also read that the non-interactive frontend becoming interactive was considered a bug and was fixed on Ubuntu 21.10 packages according to this (pay attention to comment #5) issue in Canonical's Launchpad, so I'm guessing here that I don't expect this solution to be required anymore upgrading from Ubuntu 22 onwards, but haven't checked (not my case)
As mentioned, for my specific case Ubuntu 20 to 22 your solution worked and do-release-upgrade -f DistUpgradeViewNonInteractive
worked as expected (non-interactively) after creating this file on the system with the exact line that you mentioned on your post.
I'm sorry, but there are some prompts with the aboves