No CentOS, qual é a diferença entre atualização do yum e atualização do yum?

94

Qual é a diferença entre yum update e yum upgrade e quando devo usar uma sobre a outra?

    
por Lester Peabody 15.11.2012 / 01:20

2 respostas

94

yum upgrade força a remoção de pacotes obsoletos, enquanto yum update pode ou não também fazer isso. A remoção de pacotes obsoletos pode ser arriscada, pois pode remover pacotes que você usa.

Isso torna yum update a opção mais segura.

De man yum :

update

If run without any packages, update will update every currently installed package. If one or more packages or package globs are specified, Yum will only update the listed packages. While updating packages, yum will ensure that all dependencies are satisfied. (See Specifying package names for more information) If the packages or globs specified match to packages which are not currently installed then update will not install them. update operates on groups, files, provides and filelists just like the "install" command. If the main obsoletes configure option is true (default) or the --obsoletes flag is present yum will include package obsoletes in its calculations - this makes it better for distro-version changes, for example: upgrading from somelinux 8.0 to somelinux 9.

upgrade

Is the same as the update command with the --obsoletes flag set. See update for more details.

    
por 15.11.2012 / 01:23
23

yum upgrade e yum update executam a mesma função que é atualizada para a versão atual mais recente do pacote.

Mas a diferença é que o Upgrade excluirá os pacotes obsoletos, enquanto a atualização os preservará.

    
por 15.11.2012 / 04:30

Tags