[ubuntu-uk] Comparing installed packages

Neil Greenwood neil.greenwood.lug at gmail.com
Mon May 5 08:07:04 UTC 2014

On 4 May 2014 13:39:40 GMT+01:00, Joe Alam <yothsoggoth at gmail.com> wrote:
>There's probably a far better way that someone with some more
>will suggest, but the first thing that came to mind is to write a
>program/script that does the following:
>- read all the files, into their own list of packages
>- combine the lists, filling a list of package names, sorted in
>alphabetical order and removing duplicates
>- iterate through the combined list, for each package check each of the
>four individual lists and if it is in there output it, otherwise leave
>That should achieve it in a fairly simple way, and can be done with any
>Best of luck,
>On 4 May 2014 13:29, "Mark Fraser" <mfraz74+ubuntu at gmail.com> wrote:
>> I've got 4 computers here that I would like to compare the installed
>> packages
>> on each one together. I've done dpkg --get-selection > installed.txt
>> each
>> computer, but now I'm trying to merge each one into a single file and
>> leave a
>> space where a package isn't installed.
>> Instead of:
>> Acpi-support     acpi-support   Acpi-support            acpi-support
>> adduser             acroread            adduser
>> adduser
>> Adobereader-enu acroread-bin    adobereader-enu adobereader-enu
>> I'd like:
>> Acpi-support     acpi-support   Acpi-support            acpi-support
>>                                          acroread
>>                                          acroread-bin
>> adduser                                                        
>>                       adduser
>> Adobereader-enu                                 adobereader-enu
>> adobereader-enu
>> Any ideas how to achieve this?

My first idea was to try Libre Office Calc. Import the files into separate sheets, cut 'n' paste to 4 columns on one sheet, scan down manually and insert a cell where necessary. 

So it depends how good your scripting is whether you follow Joe's suggestion, or go with the more manual process I've suggested. It also depends how often you intend to do the process. If it's just a one-off, don't script it unless you enjoy the challenge. 

I would also suggest ignoring the automatically installed dependencies from the list of packages - "aptitude search ~i!?automatic" should do the trick... 

Of course, if you are feeling particularly masochistic, you could try to automate the whole thing in sed! :-)


Sent from my Android device with K-9 Mail. Please excuse my brevity.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-uk/attachments/20140505/d869bb15/attachment.html>

More information about the ubuntu-uk mailing list