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

Chris Daniel cjdaniel at gmail.com
Sun Jul 19 16:26:25 UTC 2009


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.
> _______________________________________________
> PLUG mailing list
> PLUG at lists.pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug
>



-- 
Chris Daniel



More information about the PLUG mailing list