0

Does anyone here know how to get rid of the apt package manager and replace it with dnf(built from source). Do not ask me why; it's just my preference. Also, in the future, if I wanted to edit what sources dnf installs packages from, how do I achieve this? Thanks for your time.


If you need further explanation, please ask me a question so that we can be on the same page. Hopefully, my question was straightforward.

2
  • Since the package manager is such an integral part of a Linux distribution, why not switch to a distribution that uses dnf by default? I mean, the packages are basically what makes and defines any specific distribution. Commented Jul 10, 2021 at 20:45
  • @Kusalananda I understand. I'll switch to Centos. Thanks. Commented Jul 10, 2021 at 20:47

1 Answer 1

2

Debian is built around apt/dpkg. Even if you magically build dnf and make it use dpkg instead of rpm (which is a mammoth task), it still cannot use Debian/apt repositories.

I recommend abandoning this idea and using a dnf/rpm based distro instead. Or, if you love Debian, you could write wrappers for common dnf/rpm commands using apt/dpkg (like I did in the past - can share it with you).

4
  • I personally prefer DNF/RPM to APT/DPKG any day of the week. For instance DNF/RPM will never leave your system in a broken state, while you can trivially do that with DPKG without using any special options. Commented Jul 10, 2021 at 20:47
  • Thanks for the advise. Also, I am trying to build an LFS distro to better understand how Linux works. Is it possible to use Centos/SElinux as base templates for my LFS distro? Commented Jul 10, 2021 at 20:59
  • I'm not sure what "base template" means. Also mind that LFS is built around the most up to date packages while RHEL sticks to quite old packages in order to provide stability and quality. Commented Jul 10, 2021 at 21:40
  • Even if you ignore the other complexities, dependency hell, AKA the VERSION problem is an NP-complete problem. The design decisions made by Debian and Fedora to reduce this to a tractable problem are fundamentally incompatible as they chose conflicting methods to reduce the problem. It would be easier to start from the source tarballs or to modify Fedora to be more Debian like. As you haven't stated what you think is better about Debian it is hard to make suggestions. But the current path you are following will lead you to known unsolvable problems. Commented Jul 10, 2021 at 21:45

You must log in to answer this question.