Let's call one installation local, and the other remote.
On the first one, use rpm to get the list of installed packages:
rpm -qa --qf "%{NAME}.%{ARCH}\n" |sort > /tmp/localInstallationInstalledPackages
Idem, on the second one:
rpm -qa --qf "%{NAME}.%{ARCH}\n" |sort > /tmp/remoteInstallationInstalledPackages
Then, get the differences between each list using diff.
To see the package installed on the local installation, but not on the remote one:
diff /tmp/localInstallationInstalledPackages /tmp/remoteInstallationInstalledPackages |grep "^<"
To see the package installed on the remote installation, but not on the local one:
diff /tmp/localInstallationInstalledPackages /tmp/remoteInstallationInstalledPackages |grep "^>"
In the two cases, to get a list of regarded packages on one line, use the following instructions.
For instance, for the local installation:
diff /tmp/localInstallationInstalledPackages /tmp/remoteInstallationInstalledPackages |grep "^<" |awk '{print $2}' |sed -e 's/$/ /' |tr -d '\n'
Then, you can use this list to [un]install corresponding packages on local or remote installation.
In addition to this post, those instructions allow to get exactly the same installed packages between GNU/Linux installations.
sharing knowledge earned into design/development/technical delicate and/or difficult situations ...
Labels
Gnu/Linux
(95)
Administration
(83)
StorageHardware
(17)
Programming
(16)
WebBrowser
(15)
General
(11)
GNU/Bash
(7)
Solaris
(7)
Virtualization
(7)
C
(6)
Domotics
(6)
Musics
(5)
Raspberry
(5)
Desktop
(4)
Java
(4)
VersionControlSystems
(4)
ArtificialIntelligence
(2)
Optimization
(2)
multimedia
(2)
Arduino
(1)
Electronics
(1)
LTS
(1)
MacOS
(1)
Mechanics
(1)
Processing
(1)
Robotics
(1)
Ubuntu
(1)
Upgrade
(1)
ez-robot
(1)
No comments:
Post a Comment
Thank you for your visit, let's share your point of view: