Welcome to SparkyLinux forums
Zapraszamy również na polsko-języczne Forum

Author Topic: How to change apt default behaviour  (Read 1489 times)

Offline brunomiguel

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
How to change apt default behaviour
« on: August 01, 2018, 10:02:04 pm »
Hello, there.

This is my first time with Sparky (although I've used Debian and Ubuntu for more than a decade) and I've noticed that apt cancels package installations if it has to receive confirmation from the user. Example: I'm installing something, I use 'sudo apt install package-name-with-dependencies' and, if I don't use the -y flag, it will cancel the installation automatically if there are dependencies to install. Debian and Ubuntu don't do this: apt waits for the user input, be it 'y' or 'n'.

Where can this be configured? I can't seem to find a file with these options.

Offline paxmark1

  • Hero Member
  • *****
  • Posts: 855
  • Karma: 4
Re: How to change apt default behaviour
« Reply #1 on: August 03, 2018, 04:20:54 am »
Hmm , interesting.  I looked at man apt.conf  I do not seem to have one  as root updatedb  then locate apt.conf   - <I do not have one. 
Code: [Select]
oot@raunesat:/# updatedb
root@raunesat:/# locate apt.conf

nano /usr./share/doc/apt/examples/apt.conf   is a very bland and weird file.  Hopefully others have more ideas and/or help. 
Search forum for "More info easier via inxi"    If requested -  no inxi, no help for you by  me.

Offline bilotola

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Re: How to change apt default behaviour
« Reply #2 on: February 18, 2019, 02:56:31 pm »
You can pass arguments to avoid getting prompts. This works for me.
force-confold (my choice) will make these "What do you want to do about modified configuration file" questions default to N (keep your currently-installed version)
some modified configuration files can break your system if kept back & not compatible with updated package version.
Please test it before deploying in automation solutions.

« Last Edit: February 19, 2019, 09:47:39 am by bilotola »