[CentOS] how to find out the number of updates for a system

mark m.roth at 5-cent.us
Wed May 22 15:16:47 UTC 2019


Chris Adams wrote:
> Once upon a time, mark <m.roth at 5-cent.us> said:
>
>> Ralf Prengel wrote:
>>
>>> Hallo,
>>> I need the information how many updates are available for a system.
>>> What is the best way to find it out in a one line bash script.
>>>
>>>
>> yum check-update, perhaps?
>
> Note that "yum check-update" or "yum list updates" won't tell you how
> many packages would be installed with "yum update"... dependencies and such
> are not resolved for check-update/list updates.
>

Ok, you want it all, fine:
echo "n" | yum  update | egrep "Install|Upgrade"

      mark



More information about the CentOS mailing list