I created a list of packages installed on my system (say A) with the following command:
dpkg --get-selections > packages_on_A.txt
and then I did for another one (say B)
dpkg --get-selections > packages_on_B.txt
Then I diff'ed the above two files:
diff packages_on_A.txt packages_on_B.txt
to get a output like this:
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.