LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Can confirmation be bypassed in CLI while installing software or upgrading? (https://www.linuxquestions.org/questions/linux-newbie-8/can-confirmation-be-bypassed-in-cli-while-installing-software-or-upgrading-4175534600/)

TristanDee 02-20-2015 04:56 AM

Can confirmation be bypassed in CLI while installing software or upgrading?
 
I don't know why I want this, but is there a way the
Code:

sudo aptitude install <package>
or
Code:

sudo aptitude upgrade
command could bypass the confirmation stage? It's always occurred to me shouldn't there be some command parameter for install/upgrade that does the work?

Let me give an example. Suppose I want to install Variety, the wallpaper changing application. Now, I know that I want to install the software with all the dependencies it requires to install/run - the entire package. So, isn't it obvious that I would press Y when aptitude shows the info what it's going to download/install and asks for permission?

I can't, however, imagine scenarios when seeing that information I'd change my mind and press N to abort the install/upgrade procedure.

syg00 02-20-2015 05:55 AM

Did you check to see what the manpage had to say ?.

Ihatewindows522 02-20-2015 07:02 AM

For apt-get, yum, and zypper, append -y after the package manager command, and before the name of the package(s) to install.

TristanDee 02-20-2015 11:33 AM

Quote:

Originally Posted by syg00 (Post 5320498)
Did you check to see what the manpage had to say ?.

Thank you for directing me that way. Actually, never went down to the -y part. Learnt the lesson!

And also thanks to Ihatewindows522.

TobiSGD 02-20-2015 01:34 PM

Be careful with that option, though. If you want to install a package that conflicts with an already installed package you might see half of your system being removed because of this option, while you would see that problems will arise when being asked for confirmation instead.

TristanDee 02-21-2015 05:51 AM

Quote:

Originally Posted by TobiSGD (Post 5320717)
Be careful with that option, though. If you want to install a package that conflicts with an already installed package you might see half of your system being removed because of this option, while you would see that problems will arise when being asked for confirmation instead.

Will sure remember that, Tobi. I'm not certain I'll ever use that option - I just posted this thread out of a moment's frustration :) .

Ihatewindows522 03-02-2015 03:12 PM

Quote:

Originally Posted by TristanDee (Post 5320964)
Will sure remember that, Tobi. I'm not certain I'll ever use that option - I just posted this thread out of a moment's frustration :) .

Believe me, if you want to give it a few tasks to run when you gotta run, you'll be glad you've got it. ;)


All times are GMT -5. The time now is 09:32 PM.