We are trying to setup a local repo that contains all the base packages. So to get started we need to download around 3500+ packages and save it in a folder that will be used as a Repo storage.

We have tried following:

1. for i in `cat pkg_list`; do yum install $i --downloadonly --downloaddir=/pkgs/; done

The above for loop fails when trying to parse the next value of $i because there is already a live yum process running.

2. yum install <all packages> --downloadonly --downloaddir=/pkgs/

In the above command, we are not sure how to pass all 3500+ package names.

Any ideas or suggestions would be really helpful! Thanks.


Try this:

$ yum install --downloadonly --downloaddir=/pkgs/ `cat pkg_list`

You can specify multiple package names on the yum command line. The only caveat here is that your command line may become too long for the shell.


| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.