I created a list of packages installed on my system (say A) with the following command:
Code:
dpkg --get-selections > packages_on_A.txt
and then I did for another one (say B)
Code:
dpkg --get-selections > packages_on_B.txt
Then I diff'ed the above two files:
Code:
diff packages_on_A.txt packages_on_B.txt
to get a output like this:
Code:
splashy
libsplashy
lm-sensors
libsensors4
Basically I would like to now remove all the above package using dpkg --purge.
I can do it manually by running dpkg --purge couple of times. But I was wondering if there is any way by which I can pass the output of the diff command to dpkg --purge as arguments.
I know this is a very trial task but somehow I am not able to figure out.
I am using Debian etch (stable). I use apt-get and I DON'T intend to use aptitude or dselect.