Aptitude vs. apt-get

clay weber claydoh at midmaine.com
Fri Aug 14 15:18:56 BST 2009


O. Sinclair wrote:
> Clay Weber wrote:
>> On Thursday 13 August 2009 07:21:59 pm Steven Vollom wrote:
>>> On Thursday 13 August 2009 04:13:36 pm clay weber wrote:
>>>> Steven Vollom wrote:
>>>>> What are the differences between the two?  I typed in sudo apt-get
>>>>> install updates
>>>> If you typed in EXACTLY 'sudo apt-get install updates', then you WILL
>>>> get something wrong as the syntax and command for what you are doing is
>>>> incorrect.
>>>>
>>>> when using apt, the command syntax is this:
>>>> 'sudo apt-get <do-some-action> <some-packagename>'
>>>>
>>>> so in the command you used above, you are telling apt to install a
>>>> package with the name 'updates', which of course does not exist.
>>> When I use sudo aptitude install update it produced work.  I am confused a
>>> bit here still, because I thought I used the term updates with aptitude,
>>> but because it worked, I assume it was just update.
>> That command does produce some output, but if you *read* that output you would 
>> see that it actually did nothing, and said a lot doing so :)
>>
>>>> so, some apt commands to remember:
>>>>
>>>> sudo apt-get update (no 'S') will update the package list and look for
>>>> updates
>>> Does this means all applications that I have installed?  It is just
>>> searching for updates, then, is that right?
>> Correct
>>
>>>> sudo apt-get dist-upgrade will install updated packages
>>> And this orders the installation.  Is that correct?
>>  Correct :)
>>
> not that I am an expert on apt-get or aptitude but I would be really 
> careful with "dist-upgrade" as you might upgrade version without quite 
> realising it. At least as I understand it.

No, it won't. regular 'upgrade' will not install any new packages, while 
'dist-upgrade' will install new packages. Say an updated version of 
Amamrok needs an extra library the older version does not use. 'upgrade' 
will only update Amarok, but not install the new library (or not upgrade 
Amarok at all iirc). Dist-upgrade will.

> Normally "sudo apt-get upgrade" should be adequate if you have done 
> "sudo apt-get update" first.
> 
> Personally I use "sudo aptitude update" followed by "sudo aptitude 
> safe-upgrade". Aptitude will hold back packages like new kernel etc if 
> you use safe-upgrade. You can then judge if you want any held back 
> packages and if so do "sudo aptitude full-upgrade".
> 
> It is not really that apt-get is better than aptitude or vice versa, 
> they approach dependencies to other packages etc differently.
> 
> Hope that helps even if it does not fully answer the original query.
> 
> Sinclair
> 

In Steven's case, I think the simplest and least confusing actions are 
probably the best for this.

clay weber



More information about the kubuntu-users mailing list