2

I understand that yum and apt-get operate on top of rpm, so that the data about installed packages in a linux system is responsability of rpm; so that neither yum nor apt-get keep their own data about installed packages . Is this true ? It is safe to install some package using yum and install another (perhaps related) package using apt-get (or viceversa)?

UPDATE: I'm using Fedora 12

1
  • Seems to depend on the environment, this answer discourages the practice.
    – Cadoiz
    Dec 2, 2021 at 10:44

3 Answers 3

3

apt-get does not "operate" on top of RPM. apt-get was back-ported from Debian when RedHat based distros did not have a proper package management app.

yum was developed for RPM-based distributions.

And yes, you are correct, the package information is not maintained by the package manager, but rather by the actual packages, which include lots of "behind the scenes" information about the package, its dependencies, scripts that need to run on install/uninstall and so on.

I personally do not know if a single reason where you can't use yum and apt-get at will, even though I would stick to one or another. Debian has dselect, dpkg, apt-get and all 3 essentially do the same job and you can use either whenever you want.

2
  • But, say, does yum know about a package that was installed via apt-get ? Suppose I installed package P1 via yum, then I try to install package P2 via apt-get, and P2 depends on P1 : would apt-get know that P1 is already installed or would it try to install it itself?
    – leonbloy
    Apr 21, 2010 at 0:56
  • Again, package installers usually just run a quick check and see if the package is installed, and if not they install it, so yes, you should be able to use either or at any time.
    – solefald
    Apr 21, 2010 at 1:43
2

I am not sure what distribution you are talking about. But at least on Debian and derivatives apt-get has absolutely nothing to do with rpm. Apt-get uses dpkg as the base tool for managing packages.

But I suspect you are using some Redhat derivative with a port of apt-get. If you provide more details someone can probably provide a better answer.

1
1

On Fedora, it's highly likely that any 'apt-get' command you are using is coming from APT-RPM, which is a port of the apt-get Debian tooling to work on top of RPM. You should check, though.

In this context, yes, you should be able to use yum and apt-get (if it is from APT-RPM) interchangeably. A good way to check would be to see if you can get the apt tools to report on packages you've installed via yum.

You must log in to answer this question.

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