How to list packages installed since installing LMDE2 ? [SOLVED]

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
ron_h
Level 4
Level 4
Posts: 266
Joined: Tue Apr 15, 2014 7:03 am
Location: Sydney, NSW, AU

How to list packages installed since installing LMDE2 ? [SOLVED]

Postby ron_h » Fri Jun 16, 2017 6:04 pm

I haven't kept any manual record of packages that I've installed since installing LMDE2 on my desktop. I'm now setting up an old laptop I've been given with LMDE2 and I'd like to install much the same packages (won't be identical as the laptop is 32bit while the desktop is 64bit).

Is there a way to get a list of ONLY the packages on the desktop installed since the LMDE2 install ? I have used dpkg to list all the installed packages but I'd sooner not work all the way through line by line.

Ron
Last edited by ron_h on Fri Jun 16, 2017 8:19 pm, edited 1 time in total.

User avatar
karlchen
Level 17
Level 17
Posts: 7957
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: How to list packages installed since installing LMDE2 ?

Postby karlchen » Fri Jun 16, 2017 6:12 pm

Hello, Ron.

The logfile /var/log/dpkg.log (previous dpkg.log.1, even older dpkg.log2.gz, dpkg.log.3.gz ..) might come in almost handy.

Code: Select all

grep "status installed" dpkg.log
might still list too many packages, but it might be a good starting point.

HTH,
Karl
Image
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

ron_h
Level 4
Level 4
Posts: 266
Joined: Tue Apr 15, 2014 7:03 am
Location: Sydney, NSW, AU

Re: How to list packages installed since installing LMDE2 ?

Postby ron_h » Fri Jun 16, 2017 8:18 pm

Many thanks, Karl, that's a much more manageable list to work with.

Ron

Bill Statler
Level 1
Level 1
Posts: 12
Joined: Thu Apr 16, 2015 11:06 pm

Re: How to list packages installed since installing LMDE2 ? [SOLVED]

Postby Bill Statler » Sat Jun 17, 2017 10:52 pm

Another option, if you're installing a fresh copy of LMDE2 on the laptop:
  • List all the packages installed on the desktop computer
  • List all the packages installed on the laptop computer (after the fresh LMDE2 installation)
  • Compare the lists

So, something like this:

Code: Select all

Desktop:
dpkg-query -f '${Package}\n' -W > packages-desktop.txt
Laptop:
dpkg-query -f '${Package}\n' -W > packages-laptop.txt
Copy one file to the other computer, then:
diff packages-laptop.txt packages-desktop.txt | grep ">" > packages-to-add.txt


(I'm sure there's a more elegant way to do that, but it worked well enough for me!)

ron_h
Level 4
Level 4
Posts: 266
Joined: Tue Apr 15, 2014 7:03 am
Location: Sydney, NSW, AU

Re: How to list packages installed since installing LMDE2 ? [SOLVED]

Postby ron_h » Sun Jun 18, 2017 2:29 am

Thanks, Bill, I may end up having to do that. However it is my observation that many packages are 32bit or 64bit specific, so there would legitimately be perhaps many different packages on each machine.

Ron


Return to “Newbie Questions”