I have an enterprise network, people seems not willing to download rpm and dependancies for CentOS.

How can I

yum --download pkg_name --directory my_repo

in a system which do not use yum as packaging system such as Ubuntu or debian?

  • if your target system is ubuntu instead of centos then the package files are .deb files instead of .rpm files. debian and ubuntu use a different packagin system.
    – Skaperen
    Sep 25, 2015 at 11:35
  • why do you want to just download instead of install?
    – Skaperen
    Sep 25, 2015 at 11:35
  • I want to download packages for CentOS. Sep 25, 2015 at 14:08
  • Can you run a apt-cacher proxy on the Ubuntu system? (Despite the name, apt-cacher can be used with rpm and pacman too.)
    – muru
    Sep 26, 2015 at 4:11

3 Answers 3


It seems that Debian has yum-utils available, which should have yumdownloader, which you can use to download RPMs from yum repositories.


As far as I know, the best way for apt-based distros like Debian or Ubuntu is to install alien, which converts individual RPMs into the native deb format, and then install them individually with dpkg.

Running as root:

apt-get install alien

alien package-name.rpm

dpkg -i package-name.deb

This obviously won't resolve dependencies automatically, and dpkg will refuse to install until they are met. Someone else might know a way to make this easier or automate it.

  • Sorry, I have miswritten : I want to downmload stuff for CentOS and not for the host distribution based on debian. Sep 25, 2015 at 14:07

You can save all the deb files with dependencies using the following command

apt install --download-only kubeadm=1.20.15-00

And the files will be stored under /var/cache/apt/archives

$ cd /var/cache/apt/archives

$ ls |grep kubeadm
  • I think you missed the question asked. The question was how to download CentOS packages on a Debian-based system. Apt is not the right solution.
    – jsbillings
    Jul 29, 2022 at 2:38

You must log in to answer this question.

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