0

I m upgrading Ubuntu14(trusty) to Ubuntu16. Is there any way to do-release-upgrade without any prompts. I was already try a lot of method likes,

do-release-upgrade -f DistUpgradeViewNonInteractive
sudo sh -c 'echo "y\n\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\ny\n" | DEBIAN_FRONTEND=noninteractive /usr/bin/do-release-upgrade'

those command doesn't work for me.

Tuang
  • 21
  • 4
  • The prompts are there for a reason - they protect users from a destroyed system and total data loss. Advanced users have other options, like dist-upgrade. – user535733 May 28 '19 at 11:32
  • Thanks, i understand what u mean. But the problem is i am going to upgrade over 100 ubuntu server, this is impossible to answer evey question for 100 machine. I know ansible may solved my problem but i need to use python fabric. if u have any idea please share me. – Tuang May 28 '19 at 12:02
  • A mass-upgrade use case should probably be in the question. It changes the tone greatly. Does it *need* to be an upgrade? Can it be one of the many methods to mass clean-install? – user535733 May 28 '19 at 14:49
  • 1
    Does this answer your question? [Can I do a Silent or Unattended Release Upgrade?](https://askubuntu.com/questions/250733/can-i-do-a-silent-or-unattended-release-upgrade) – Matthias Ronge Jan 11 '21 at 07:11

1 Answers1

1

Run the following command before do-release-upgrade:

sudo echo DPkg::options \{ \"--force-confdef\"\; \"--force-confold\"\; \} | sudo tee /etc/apt/apt.conf.d/local

Then:

sudo do-release-upgrade -f DistUpgradeViewNonInteractive

That seems to fix the couple of configuration files that don't listen to the "DistUpgradeViewNonInteractive" setting in the most recent releases.

Note that this might break things, I encountered this GRUB bug as well as some other random crashes while upgrading via this manner. I don't recommend this upgrade path for production servers.

Mahn
  • 111
  • 5