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

Quick to answer questions about finding your way around Linux Mint as a new user.
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. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
cecilieaux
Level 5
Level 5
Posts: 742
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 »

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.
Cecilieaux
--
Every time I think I'm past newbiedom something like this happens.
Running Linux Mint 21 Vera with Cinnamon.
User avatar
Termy
Level 12
Level 12
Posts: 4248
Joined: Mon Sep 04, 2017 8:49 pm
Location: UK
Contact:

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

Post by Termy »

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.
I'm also Terminalforlife on GitHub.
thedesertdoc

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

Post by thedesertdoc »

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 12
Level 12
Posts: 4248
Joined: Mon Sep 04, 2017 8:49 pm
Location: UK
Contact:

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

Post by Termy »

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.
I'm also Terminalforlife on GitHub.
TI58C
Level 4
Level 4
Posts: 389
Joined: Tue Jul 18, 2017 5:57 am

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

Post by TI58C »

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 “Beginner Questions”