yum Download All Source Packages (SRPM) From RedHat / CentOS WebSite

To download all source packages (SRPM) from RedHat or CentOS website using yum, you can use the yumdownloader command.

Here’s an example command to download all source packages from the base repository of CentOS 7:

yumdownloader --source --destdir=/path/to/download/directory --disablerepo=* --enablerepo=C7.0.1406-base *

This will download all source packages from the base repository of CentOS 7 to the specified directory.

Here’s a brief explanation of the options used in the above command:

  • --source: specifies that source packages should be downloaded.
  • --destdir: specifies the destination directory where the packages will be downloaded.
  • --disablerepo=*: disables all repositories by default.
  • --enablerepo=C7.0.1406-base: enables the base repository of CentOS 7.0.1406.
  • *: specifies that all packages should be downloaded.

You can modify the enablerepo option to download packages from a different repository. You can also use wildcards to download packages that match a particular pattern.

Leave a Comment