[PLUG] Using YUM to install RPMs from a text file list

Larry Brigman larry.brigman at gmail.com
Sun Jul 19 17:49:32 UTC 2009


On Sun, Jul 19, 2009 at 9:26 AM, Chris Daniel<cjdaniel at gmail.com> wrote:
> Here's how I do it; this way strips out the versions (only writes the
> package name to the file) so that dependencies can work correctly even
> if you haven't upgraded the source system for a while:
>
> grab list of packages, minus versions:
> # rpm -qa --queryformat "%{NAME}\n" > /tmp/rpmlist
>
> install/update all missing RPMs from the list:
> # yum install `cat /tmp/rpmlist`
>
> HTH
>
> On Sun, Jul 19, 2009 at 7:44 AM, Joe Pruett<joey at clean.q7.com> wrote:
>>> So I have a file generated by
>>> $ rpm -qa > rpmlist.txt
>>
>> yum install `cat rpmlist.txt`
>>
>> those are backquotes.  if the file is too big the shell will whine so then
>> you cat use xargs like:
>>
>> xargs -n 100 yum install < rpmlist.txt
>>
>> to use 100 at a time.

Yum will take the version info if you needed.



More information about the PLUG mailing list