I have a scenario where I need to install an arbitrary list of RPM packages (usually around 5-10 packages) on a server with no network connection. Some packages are from EPEL and I want to avoid having to sync all repos since I need to do this often.

I have solved this for RHEL/CentOS 7 by doing the following:

$ yum -y install epel-release createrepo
$ repotrack $PACKAGE_NAME
$ createrepo --database .

Then I just move this folder onto the server using a USB drive and create a repository file in /etc/yum.repos.d, allowing me to install the package with yum --disablerepo="*" --enablerepo="my-custom-repo" install $PACKAGE_NAME.

Now I am moving this to RHEL/CentOS 8 and while it works for half of my packages, I get the following error for the other half when I do dnf install on the isolated server:

No available modular metadata for modular package 'podman-1.6.4-2.module_el8.1.0+272+3e64ee36.x86_64', it cannot be installed on the system

I figure this is due to the new modular system and my repo does not have all the necessary info. I have tried to read the manual for both repotrack and createrepo but none of them seem to mention modules. Searching the Internet just gave me solutions for 7, which I already have, but I failed to find anything for 8 and packages that belongs to modules in particular.

So how do I fetch RHEL/CentOS 8 packages belonging to modules, and all their dependencies, to disk, so I can then move them to another server and install them there?


2 Answers 2


Take a look at the modulemd-tools project. You can find precompiled binaries in EPEL.

Assuming you have several modular rpms in ./my-custom-repo/Packages:

modular rpms names like python36-3.6.8-2.module_el8.1.0+245+c39af44f.x86_64.rpm


cd my-custom-repo
# create traditional rpm repo
createrepo_c .
# generate modules meta info
repo2module  -s stable -d . modules.yaml
# adjust modules meta info to traditional rpm repo
modifyrepo_c --mdtype=modules modules.yaml repodata/

After all this work, you can find a file names like xxxx-modules.yaml.gz in repodata dir.

The repo should work now.


yum still works on RHEL 8. Also there is a download only option for DNF as well as yum.

--downloadonly Download the resolved package set without performing any rpm transaction (install/upgrade/erase).

yum install httpd --downloadonly

get the files downloaded and copy where you want then do a

dnf localinstall packagename
  • 1
    Firstly, downloadonly will only resolve packages for the current server, repotrack will include any packages already installed. This is required since the target server may not have the same packages as the one doing the download. Secondly, as I stated the above works great for normal packages, the problem is packages belonging to modules. I don't think switching to downloadonly would fix that. Feb 12, 2020 at 7:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .