Log of installed software? (not default, not libs)

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
cecilieaux
Level 5
Level 5
Posts: 552
Joined: Mon Dec 09, 2013 9:43 am
Location: Washington, D.C.

Re: Log of installed software? (not default, not libs) <SOLVED>

Post by cecilieaux » Fri Nov 24, 2017 5:59 pm

Termy wrote:You might find this useful:

https://github.com/terminalforlife/lspkg
Little gem. Of course, I have no idea what all the libraries are.
Every time I think I'm past newbiedom something like this happens.
Linux Mint 19.2 Tina 64-bit

User avatar
Termy
Level 5
Level 5
Posts: 764
Joined: Mon Sep 04, 2017 8:49 pm
Location: UK
Contact:

Re: Log of installed software? (not default, not libs)

Post by Termy » Sun Nov 26, 2017 9:40 am

That works. However, it depends on how your history is set up. For example, I don't use file history (security purposes), but instead use just the temporary history which gets cleared when you close the terminal.

By the way, what output are you after for that command you showed? I'd be happy to get it for you.
Here to help.

I'm LearnLinux (LL) on YouTube: https://www.youtube.com/channel/UCfp-lN ... naEE6NtDSg
I'm also terminalforlife (TFL) on GitHub: https://github.com/terminalforlife

thedesertdoc
Level 1
Level 1
Posts: 1
Joined: Wed Jan 03, 2018 12:33 pm

Re: Log of installed software? (not default, not libs)

Post by thedesertdoc » Wed Jan 03, 2018 12:43 pm

I have been looking at this recently. To come at the problem from a different direction, the closest to what I think you originally asked is to look at the menu entries:

Code: Select all

ls -1 /usr/share/applications/
This will not pick up the command-line utilities, but will give you a list of programs, but not all the libraries, dependencies, etc

User avatar
Termy
Level 5
Level 5
Posts: 764
Joined: Mon Sep 04, 2017 8:49 pm
Location: UK
Contact:

Re: Log of installed software? (not default, not libs)

Post by Termy » Wed Jan 03, 2018 8:27 pm

That is quite limited, sadly. Not all programs even have a .desktop file, although most GUI ones probably do. Shame it wouldn't pick up CLI ones, of which there are many. It also isn't a log, nor does it show what has been installed, only what's there. But, I suppose it is something.
Here to help.

I'm LearnLinux (LL) on YouTube: https://www.youtube.com/channel/UCfp-lN ... naEE6NtDSg
I'm also terminalforlife (TFL) on GitHub: https://github.com/terminalforlife

TI58C
Level 4
Level 4
Posts: 354
Joined: Tue Jul 18, 2017 5:57 am

Re: Log of installed software? (not default, not libs)

Post by TI58C » Thu Apr 04, 2019 5:21 am

Hi all,

Have been "down and out" for a long time now. Left some dialogs / discussions rather abruptly, sorry about that. Life interfered.
Recently did a new 19.1 Mate install. Wanted to migrate all packages I installed on my 17.3 system. So I used Coldboot 's answer (sep 28 2017), but refined it a bit.

The method described here will generate a shell script that contains apt-get install commands for all packages installed by:
-apt
-aptitude
-apt-get install
-dpkg
-gdebi
-software manager
-package manager (Synaptic)

Step 1
On your OLD system, open terminal and run this command (yes, it's one line):

Code: Select all

outputfile="reinstall.sh" ; comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u) | awk ' BEGIN {printf "#!/bin/bash\n\n"} $0 !~/^lib.*|^linux-.*|.*-common$|^g++.*|^gcj-.*|^nautilus.*/ {printf "apt-get install " $0 "\nprintf \"\\n\\n\\n-------------------------------------------------------------------------------\\n\\n\\n\"" ; printf "\n" } ' > "$outputfile" ; chmod 777 ./"$outputfile"
This will generate shell script "reinstall.sh"

Step 2
Review this file in text editor and remove any lines containing packages you do not want to install on your new system. I promise it will not be too much effort.

Step 3
Copy shell script reinstall.sh to your NEW system and run it as root.

Code: Select all

sudo ./reinstall.sh
You'll still have to confirm the actions ap-get is proposing by pressing "Y"

If you feel vary adventurous or lucky, you can substitute step 1 with:

Code: Select all

outputfile="reinstall.sh" ; comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u) | awk ' BEGIN {printf "#!/bin/bash\n\n"} $0 !~/^lib.*|^linux-.*|.*-common$|^g++.*|^gcj-.*|^nautilus.*/ {printf "apt-get install -y " $0 "\nprintf \"\\n\\n\\n-------------------------------------------------------------------------------\\n\\n\\n\"" ; printf "\n" } ' > "$outputfile" ; chmod 777 ./"$outputfile"
This will add the -y option to the apt-get install commands for a hands-off, start and walk-away reinstall of all packages that were on your old system.
from the man page:
-y, --yes, --assume-yes
Automatic yes to prompts; assume "yes" as answer to all prompts and run non-interactively. If an undesirable situation, such as changing a held
package, trying to install a unauthenticated package or removing an essential package occurs then apt-get will abort.

I know this answer is rather late. But as 17.3 will not be supported after april 2019, hope this helps people "migrate" from their old beloved 17.3 (or 18) to 19.1 (or future) release.

Robert
Linux is like my late labrador lady-dog: loyal and loving if you treat her lady-like, disbehaving princess if you don't.

Locked

Return to “Newbie Questions”