Is there a simple way to download rpm files and all its dependencies in a windows machine? later on I will be transferring all the rpm files to a offline rhel 8 machine and install them there.
I've tried the Redhat's downloads> Packages, but it only downloads the package without its dependencies, so I will need to trace those dependencies and download it until all have no dependencies left, which could take forever if I need quite a few.
I also checked on Cygwin but is still confused on what commands to use or even know if it is possible.
Dependency management is the responsibility of the package manager of the platform. If you are manually downloading and installing packages the responsibility becomes yours as you have realized. So instead downloading packages download full repo, or install disk. Mount the install disk and install packages from it.
Another way may be this:
I am assuming you are using yum
as package manager.
yum
plugin yum-plugin-downloadonly
yum install --downloadonly <package-name>
to download packages./var/cache/yum/
<directory>
with which the files you want them to be saved. yum install --downloadonly --downloaddir=<directory> <package-name>
After files downloaded you can transfer files to your offline machine and then proceed.