I am planning on basically cloning a fedora installation between two different machines. I am doing clean installation in the new system. However, I would like to know if it is possible to not only copy over the already installed packages, which I know is easily possible. See Sync two installs of Fedora or How to replicate installed package selection from one Fedora instance to another?

My question then would be if it is possible to not only install all missing packages, but also remove those, which are not installed on the source system? I found something like this is possible with apt, using apt-clone, but I found nothing in the rpm/dnf environment.

1 Answer 1


Same method, really. Get your local list of packages, get the remote list, use sort to sort them, use comm -2 -3 local.txt other.txt to get the entries that are only in your local installation. Then first uninstall these, and afterwards install the remote list. (If you're using dnf shell, you can combine these steps into one.)

Note that this 100% sounds as if you need a good backup solution for your files and settings, as installing a fresh fedora would not unlikely to be faster.

  • Thanks, I do back up all my personal data and the necessary stuff in /. But then it needs to be done manually, in another program, and there' s no integrated way of doing that.
    – hannes101
    Jan 15 at 6:25

You must log in to answer this question.

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