Ask Your Question

export package

asked 2015-12-17 05:59:55 -0600

tareksaber gravatar image

how can i export all package from linux system (fedora 23) to harddisk and import it in anther machine

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-12-17 11:03:59 -0600


It's not possible to do that, once the .rpm is installed it's no longer kept on the machine (by default, could be possible to keep all the packages, but that could require some extra work). But, what you could do is to list all the installed packages

sudo dnf list installed | cut -d" " -f1 | sort -u > my_packages.txt

and then use that list as input for dnf to install the same packages in the new box

cat my_packages.txt | while read package; do sudo dnf -y install $package; done

(the above line is not nice, and it's possible to improve its performance, but should do the trick quick and dirty ;) )

Make sure that you have installed/enabled the same repos in both machines (RPMFusion et al)


edit flag offensive delete link more


What is the language that is written this code

tareksaber gravatar imagetareksaber ( 2015-12-20 04:41:52 -0600 )edit

bash, you should be able to execute it in any terminal

casep gravatar imagecasep ( 2015-12-21 03:06:15 -0600 )edit

thank you for all

tareksaber gravatar imagetareksaber ( 2015-12-21 05:28:02 -0600 )edit

Question Tools

1 follower


Asked: 2015-12-17 05:59:55 -0600

Seen: 75 times

Last updated: Dec 20 '15