LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-04-2022, 04:44 PM   #1
erik2282
Member
 
Registered: May 2011
Location: Texas
Distribution: Primarily Deb/Ubuntu, and some CentOS
Posts: 831

Rep: Reputation: 229Reputation: 229Reputation: 229
how to get past answering yes to apt upgrade (not -y switch)


Ubuntu Server 20.04LTS

Just for testing/curiosity reasons, I setup a crontab:

Code:
0 0 * * SUN apt update && apt upgrade -y && reboot
It doesn't complete because of the prompt below.

This machine runs Ubiquiti's Unifi controller software (for my Wifi) installed. When running apt upgrade, there is a prompt for a question about backups:
Code:
Package configuration


     ┌────────────────────────────┤ Configuring unifi ├─────────────────────────────┐
     │                                                                              │ 
     │ It is recommended that you create a backup before installing a new version.  │ 
     │                                                                              │ 
     │ Do you have a backup?                                                        │ 
     │                                                                              │ 
     │                     <Yes>                        <No>                        │ 
     │                                                                              │ 
     └──────────────────────────────────────────────────────────────────────────────┘
Normally, passing the apt upgrade -y switch is sufficient but not in this case because of the prompt above. Is there a way to bypass or auto answer yes to this during the upgrade. I'll be testing the ubuntu auto unattended-upgrades as well, but was curious about doing it this way.

Questions/Comments?

Thanks
Erik

Last edited by erik2282; 04-04-2022 at 04:46 PM.
 
Old 04-04-2022, 07:00 PM   #2
SlowCoder
Senior Member
 
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Debian based
Posts: 1,250

Rep: Reputation: 164Reputation: 164
Possibly this will point you in the right direction?
https://serverfault.com/questions/10...onffile-prompt
 
Old 04-04-2022, 07:31 PM   #3
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,

I'm not familiar with that unifi package, but if it is using debconf for that dialogue you may be able to make it non-interactive by changing your debconf settings. Eg
Code:
sudo dpkg-reconfigure debconf
In particular, setting it to ignore everything other than critical questions.

Evo2.

Last edited by evo2; 04-04-2022 at 10:45 PM. Reason: s/man/may
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
sudo apt-get -y -u dselect-upgrade --force-yes causing to remove VIM vicky151 Linux - Newbie 2 05-16-2014 09:46 AM
Howabout apt-get update ; apt-get upgrade -f -y --force-yes in the crontab every week frenchn00b Debian 1 04-05-2008 07:47 AM
3D acceleration YES YES YES glxgears results props666999 Slackware 44 07-29-2005 08:40 PM
Yes Yes Yes! I Got Sound! shazam75 LinuxQuestions.org Member Success Stories 2 10-14-2004 04:11 AM
What's the difference between apt-get upgrade and apt-get dist-upgrade? davidas Linux - Newbie 4 04-04-2004 08:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration