Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a way to make apt-get install answer "yes" to the "Do you want to continue [y/N]?"?

share|improve this question
7  
If you want, we can each post it a few more times, just to make sure you get the point. ;) –  jrc03c Jul 16 '10 at 20:38
    
Yeah do that. I found the answer myself about 5 seconds after I posted this =/ It's Friday, I was answering the question for someone else and when I finally got to my computer, I posted it before I realized I just had to check the help. Thanks! –  Mistiry Jul 16 '10 at 20:41
add comment

5 Answers

up vote 45 down vote accepted

via the apt-get man page:

apt-get -y install [packagename]
share|improve this answer
1  
I'm accepting your answer only because of the funny comment. Everyone else, I voted yours up. –  Mistiry Jul 16 '10 at 20:58
    
Hahaha - thanks! –  jrc03c Jul 17 '10 at 4:14
add comment
APT::Get::Assume-Yes "true";

APT::Get::force-yes "true";

This should at least be in /etc/apt/apt.conf and commented out. I worry Ubuntu is taking the Microsoft tack of always asking for permission.

"Are you sure?", of course I am sure, I am not a trained monkey simply typing away at the keyboard, going click happy.

Next the door will ask, "Are you sure you want to go outside?"
The oven will ask, "Are you sure you want to cook?"
The automobile will ask, "Are you sure you want to apply brakes?"
The fire extinguisher will ask, "Are you sure you want to put out the fire?"
I am sorry Dave, I can't let you do that.
HAL9000 could use a contraction but Data could not, or couldn't.

share|improve this answer
add comment

The problem with:

apt-get --yes install $something

is that it will ask for a manual confirmation if the package signature owner's public-key is not in the keyring, or some other conditions. to be sure it does not ask a confirmation just do this:

apt-get --yes --force-yes install $something

If you want to have these settings permanent, create a file in /etc/apt/apt.conf.d/, like /etc/apt/apt.conf.d/90forceyes with the following content:

APT::Get::Assume-Yes "true";
APT::Get::force-yes "true";
share|improve this answer
    
+1 for variety. All the -y were getting boring. (Plus it's a more complete answer.) –  Dennis Williamson Jul 16 '10 at 23:30
    
+1 the best answer - I was looking for the solution to force yes, rather than having to specify it each time –  Robin Winslow Oct 11 '12 at 12:15
add comment

From the apt-get HOWTO

Use the -y switch: apt-get -y install packagename

share|improve this answer
add comment
apt-get -y update
apt-get -y install [package]
share|improve this answer
    
+1 , but why update needs permission? –  amyassin May 22 '12 at 20:31
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.