Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

So, is it possible to update and upgrade without running:

sudo aptitude update && sudo aptitude upgrade

Meaning, is there one command that can do both?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

Unfortunately, the two commands have to be executed separately.

share|improve this answer
    
Thanks! This answers it perfectly! –  polandeer Jul 10 '12 at 0:09

If you are annoyed by too much typing, you can define yourself an "alias". This can be done e.g. by adding a line to the end of your $HOME/.profile like this:

alias sau='sudo aptitude update && sudo aptitude upgrade'

(of course you can replace "sau" by something else -- for me that's an acronym to Sudo Apt-get Update). After saving the file, open a new shell (or "source" the .profile again running . $HOME/.profile. Now you can always simply type "sau" to do the complete job. Works great for me with multiple machines.

share|improve this answer
    
Hm. I guess I was just asking someone to tell me to alias it :P –  polandeer Jul 10 '12 at 0:09
    
Yeah, but that's the only way to do it with a "single command". And your question did not exclude this ;) –  Izzy Jul 10 '12 at 8:13
    
Tricky. Anyways, the only reason I asked was because I wanted to understand apt better, not because I'm too lazy to write sudo aptitude update && sudo aptitude upgrade The reason I asked was because you can do it with pacman (sudo pacman -Syu --noconfirm). –  polandeer Jul 12 '12 at 12:14
    
If you have to do that often and on multiple machines, you're glad you can at least have an alias. However: apt-get update has a parameter -u, according to the man page that shows available updates. Did not try whether it then asks to apply them (have no Ubuntu/Debian near me to check right now). –  Izzy Jul 12 '12 at 13:31

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.