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.
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

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

Post by catweazel »

TI58C wrote:@BG405,

Your method will probably work, but is limited. It will NOT list packages installed by using software-manager, synaptic package manager and probably even gdebi, dpkg.
Where's your better script then?
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
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)

Post by cecilieaux »

TI58C wrote:@BG405,

Your method will probably work, but is limited. It will NOT list packages installed by using software-manager, synaptic package manager and probably even gdebi, dpkg.

Robert
So the real deal would come if there were a way for software-manager, synaptic package manager, gdebi and dpkg to report what they install.
Cecilieaux
--
Every time I think I'm past newbiedom something like this happens.
Running Linux Mint 21 Vera with Cinnamon.
User avatar
karlchen
Level 23
Level 23
Posts: 18222
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

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

Post by karlchen »

Hi, cecilieaux.

Had Aptik not been mentioned in the course of this thread? Have you given Aptik a n extensive try perhaps in the meantime? If so what is your impression?
I failed to understand your reply on Aptik above, whether it was meant positive or negative.

Cheers,
Karl
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 771 days now.
Lifeline
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 »

MrEen wrote:However, packages that pulled in other items can look like this:

Code: Select all

Start-Date: 2017-08-10  16:35:07
Requested-By: username (1000)
Install: libgnomecanvas2-common:amd64 (2.30.3-2, automatic), libgnome2-bin:amd64 (2.32.1-5ubuntu1, automatic), libgnomeui-0:amd64 (2.24.5-3.1, automatic), grhino-data:amd64 (0.16.1-3, automatic), grhino:amd64 (0.16.1-3), libbonobo2-common:amd64 (2.32.1-3, automatic), libbonoboui2-common:amd64 (2.24.5-3ubuntu1, automatic), libgnomeui-common:amd64 (2.24.5-3.1, automatic), libgnome2-0:amd64 (2.32.1-5ubuntu1, automatic), libgnome-2-0:amd64 (2.32.1-5ubuntu1, automatic), libbonoboui2-0:amd64 (2.24.5-3ubuntu1, automatic), libgnomecanvas2-0:amd64 (2.30.3-2, automatic), libbonobo2-0:amd64 (2.32.1-3, automatic), libgnome2-common:amd64 (2.32.1-5ubuntu1, automatic)
End-Date: 2017-08-10  16:35:21
Here, I believe would be impossible without already knowing the name of everything installable.

Also, I have no idea if/when these logs get rotated out of existance.

At the very least, the logs can be sifted with the users own eyes to build a list on their own.
This is where one of my shell programs may be useful: https://github.com/terminalforlife/apt-undo-install

With that installed, you can run, for example:

Code: Select all

apt-undo-install --output-only:list --date=2017-09-26 --time=17:59:04
...to show a list of packages which were installed (by the date and time, as per what you see in apt-undo-install --view). It wasn't the sole purpose of apt-undo-install, but it's a handy bonus feature. :) See apt-undo-install --help for more info.
I'm also Terminalforlife on GitHub.
ColdBootII

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

Post by ColdBootII »

This command does it although there may be a number of lib* files included, also kernels, but these are easy enough to filter out if you want.

comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)

Edit: sans dates though. I don't need them as I can find that info easily in Synaptic's history.
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 »

ColdBootII wrote:This command does it although there may be a number of lib* files included, also kernels, but these are easy enough to filter out if you want.

comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)

Edit: sans dates though. I don't need them as I can find that info easily in Synaptic's history.
Interesting command. I'm yet to come across comm. I tested it with comm -23 <(apt-mark showmanual) but got a syntax error, likely because you forgot the $, for command substitution; I thought it might've been some special array syntax. lol Still, apt-mark showmanual on its own is awesome, and I'm annoyed I didn't know about it. xD Always meant to look into apt-mark, but never realised how useful it is!

Code: Select all

apt-mark showmanual | grep -v "^\(lib.*\|linux-.*\)"
This worked nicely for me. Definitely gonna add this to my notes. :)
I'm also Terminalforlife on GitHub.
User avatar
BG405
Level 9
Level 9
Posts: 2508
Joined: Fri Mar 11, 2016 3:09 pm
Location: England

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

Post by BG405 »

catweazel wrote:
TI58C wrote:@BG405,

Your method will probably work, but is limited. It will NOT list packages installed by using software-manager, synaptic package manager and probably even gdebi, dpkg.
Where's your better script then?
:lol: :mrgreen: Yes, indeed, as you probably also noticed I did state "installed via the Terminal" in my post. Actually I would like to write such a script if the other respondent doesn't get there first :) he evidently missed that bit.
Dell Inspiron 1525 - LM17.3 CE 64-------------------Lenovo T440 - Manjaro KDE with Mint VMs
Toshiba NB250 - Manjaro KDE------------------------Acer Aspire One D255E - LM21.3 Xfce
Acer Aspire E11 ES1-111M - LM18.2 KDE 64 ----Two ROMS don't make a WRITE
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 »

Catweazel wrote:
Where's your better script then?
And then:
BG405 wrote:
:lol: :mrgreen: Yes, indeed, as you probably also noticed I did state "installed via the Terminal" in my post. Actually I would like to write such a script if the other respondent doesn't get there first :) he evidently missed that bit.
No, I did NOT miss that bit, just wanted to highlight it because most newbies (myself included) do not install by command line, but by means of software / package manager. And because topic-starter asked for a list of installs that :
1) ARE NOT

-- installed by default by Linux Mint
-- libraries or helper programs

2) WERE INSTALLED BY ME, through

-- Software Manger
-- Synaptic
-- apt at command line (with PPA)
-- the odd direct download of a *.deb or *.gz (yes, yes, it's bad, bad, bad, 20 lashes with a wet noodle)
As to script: at the moment I'm trying to get the info I want (and cecillieaux wants) by means of the oneliner I suggested Wed Aug 30, 2017 2:01 am. Which by the way, does show installs by apt, dpkg, synaptic, software-manager.

The standard mint-install can easily be filtered out. Have put the rest of that list in pivot-table LO calc. This gives list of installed packages per day/date. MOST of the times, a package I installed is the first one on that day, followed by evt. dependencies, but not ALWAYS. My 17.3 system has install dates ranging from 2015-11-29 up to today. So that is a nice sample.

Writing a script to answer cecillieaux 's quiestion is not trivial. At least not to me.

Maybe one of you would be so kind as to comment on the viability of my idea Tue Sep 05, 2017 12:24 pm ?
But, just an idea (maybe nothing but "wildly blue" nonsense). Wouldn't it be possible to
1. Install same linux version that makes up your main system on live USB
2. update that USB, then run one-liner I suggested Tue Aug 29, 2017 8:01 pm, using > livelist.txt
3. use the same oneliner on your main system > mainlist.txt

Then you have two lists, one from "pure" updated USB system, and one from main system, that includes packages you installed (though not if compiled or installed by non package management method) .

Subtract all lines [edit] containing packages that are in livelist (just names, 1st column because install dates will differ) from mainlist and you have a much reduced data-set to work with. You could do this with relational database prog, using awk, or maybe even using something like vlookup in libreoffice calc.[edit] It will still list every lib/downloaded dependency of every program (or package group) you installed, but it might help.
It's easy to write sarcastic comments. At least I've tried to be creative and came up with possible ways to tackle this problem.
No, it's not a script (yet). Maybe it never will be. Do not know if i can. But if you "guru's" think it's simple, I'm very curious to see what you come up with. :D

[Added later]
ColdbootII 's method looks very nice and concise. The list it produces looks to be the answer ? Hope this is the solution.
Take my hat off for you ColdbootII.

Contains commands I've never used before, so am now working to understand exactly what it does.


Robert

PS: interesting material :
https://unix.stackexchange.com/question ... pendencies
https://unix.stackexchange.com/question ... d-packages
And let's not forget
https://askubuntu.com/questions/2389/ge ... 343#492343
Credit where credit is due.
Linux is like my late labrador lady-dog: loyal and loving if you treat her lady-like, disbehaving princess if you don't.
User avatar
BG405
Level 9
Level 9
Posts: 2508
Joined: Fri Mar 11, 2016 3:09 pm
Location: England

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

Post by BG405 »

My comment wasn't intended to be sarcastic, so apologies may be due. There's some very interesting reading in this thread and I actually would like to write a script to do what the OP wants, and also what I would like to achieve, unfortunately I don't yet have the skills to do that. Maybe soon :)
Dell Inspiron 1525 - LM17.3 CE 64-------------------Lenovo T440 - Manjaro KDE with Mint VMs
Toshiba NB250 - Manjaro KDE------------------------Acer Aspire One D255E - LM21.3 Xfce
Acer Aspire E11 ES1-111M - LM18.2 KDE 64 ----Two ROMS don't make a WRITE
ColdBootII

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

Post by ColdBootII »

TI58C wrote: The list it produces looks to be the answer ? Hope this is the solution.
Well, it is a solution in the sense that sometimes it can be a useful reference.

It shows everything you yourself have installed in every way that involved apt. As I've already noted, you can add a pipe at the end of it and do, for instance grep -Ev (^lib|^linux-) to exclude most dependency libraries and manually added kernels from the output and then it is as close to being a precise listing of manually installed apps as it can be.
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 »

@BG405, Catweazel,

Yes, I did feel a bit hurt. Maybe I overreacted. Please accept my apologies for that also.
Agree: this thread has already taught me quite a bit. And I do have a stake in it: want to try an 18.2 or 3? install.
ColdbootII 's answer produces a list that is short enough to clean /filter manually. Next step will be to try aptik.

No need to invent the wheel as an amateur when there are cars built by engineers.

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

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

Post by ColdBootII »

TI58C wrote: Next step will be to try aptik.

No need to invent the wheel as an amateur when there are cars built by engineers.

Robert
When you do and try sudo aptik --list-manual or --list-extra, you will notice that it is a more or less the same amount of filter work ahead of you... :mrgreen:
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 »

@coldbootII

Well, as Aptik and previous one-liner probably draw on the same sources, it does not surprise me.

Grepping results is elementary. But still...manual not only lists truly manually installed packages, but also some stuff system thinks is important. Like libs, like kernels, like python*, like X-programs etc.
Still, previous one-liner gave 2228 records/lines. This one only 73... Filtering manually in such a small sample is faster / more reliable than grep/sed/tr statements. Leaves me with a list of just 53 packages I need to reinstall when doing clean-install of 18+ version.
That's peanuts, maybe an hour (or two) of my time.

Yes , the list omits the programs xflux and wmctrl. But these are linux-binaries I copied into path. I know, it's a sin.

Robert
Linux is like my late labrador lady-dog: loyal and loving if you treat her lady-like, disbehaving princess if you don't.
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 Cecillieaux,

Did you try coldbootII 's solution ?
As far as I can tell, this will (almost) solve your question.
Will list every package you installed by apt/dpkg/gdebi/software manager/package manager. Only stuff you compiled will be left out.
The list does have some "scruff" in it, that is: packages that the system marks as being manually installed but in reality are installed automatically. But it's easy and not too much effort to filter these. And Aptik seems to have the same limitations.

Thank you for bringing up this question.

Robert
Linux is like my late labrador lady-dog: loyal and loving if you treat her lady-like, disbehaving princess if you don't.
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)

Post by cecilieaux »

cecilieaux wrote:Is there, somewhere in the bowels of Linux Mint a log that lists software installed and when it was installed?

(Yes, this is a n00b question. I searched and could not find the answer.)

Cecilieaux
SOLUTION: Although there isn't anything all that simple, the app Aptik let's you back up "downloaded programs." That's what I'm going with.
Cecilieaux
--
Every time I think I'm past newbiedom something like this happens.
Running Linux Mint 21 Vera with Cinnamon.
phd21
Level 20
Level 20
Posts: 10104
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

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

Post by phd21 »

Hi Everyone,

While reviewing my bookmarks, I came across this article.

How To List All Installed Packages In Linux, Oct. 31, 2017
https://www.2daygeek.com/list-installed ... ch-linux/#

Note: Some applications listed are installed by a default operating system and or desktop (Cinnamon, Mate, KDE, or Xfce), like Linux Mint. And, because there are various installation methods, like "AppImage", ".run", ".sh" (scripts), Java (.jar) apps, snap packages, flatpaks, etc... Not sure if applications installed using some of these will show up. For example, I have "Avidemux" installed as an AppImage, StreamRipStar and Freac (Java apps), but these do not show up in these commands. I always put self-contained application packages (AppImages and Java "jar" apps) into a special folder underneath my Home folder called "Apps-Misc" that I can list (view) and backup.

Here are various console terminal commands. Tip: you can add something like
">Installed_Software_11-07-2017.txt" without the quotes to the end of these commands to create a text file list.

Code: Select all

dpkg-query -l  >Installed_Software_11-07-2017.txt

Code: Select all

apt list --installed
or

Code: Select all

dpkg -l
or

Code: Select all

dpkg-query -l
or

Code: Select all

dpkg --get-selections | grep -v deinstall
or

Code: Select all

apt-cache pkgnames


Hope this helps ...
Last edited by phd21 on Wed Nov 08, 2017 10:09 am, edited 1 time in total.
Phd21: Mint 20 Cinnamon & KDE Neon 64-bit Awesome OS's, Dell Inspiron I5 7000 (7573, quad core i5-8250U ) 2 in 1 touch screen
aes2011
Level 4
Level 4
Posts: 498
Joined: Wed Jul 06, 2011 10:39 pm

Re: Log of installed software?

Post by aes2011 »

TI58C wrote:..., the last answer on this page https://unix.stackexchange.com/question ... ation-date, works well (do read disclaimer there):...
Great thread and thanks for the link. An easy way to reference a specific answer in Stack Exchange sites is to use the "share" link for the answer because, depending on whether an answer is upvoted or downvoted or accepted, its position relative to other answers may change over time.

So, for the answer you linked to, the "permalink" would be https://unix.stackexchange.com/a/349719.
aes2011
Level 4
Level 4
Posts: 498
Joined: Wed Jul 06, 2011 10:39 pm

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

Post by aes2011 »

ColdBootII wrote:... As I've already noted, you can add a pipe at the end of it and do, for instance grep -Ev (^lib|^linux-) to exclude most dependency libraries and manually added kernels from the output and then it is as close to being a precise listing of manually installed apps as it can be.
The code will exclude libreoffice so maybe some manual intervention is required?
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) <SOLVED>

Post by Termy »

You might find this useful:

https://github.com/terminalforlife/lspkg

No timestamps though, sadly. It also won't pick up stuff you've compiled or installed with a different package manager, like pip.
I'm also Terminalforlife on GitHub.
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)

Post by cecilieaux »

I found a way to get a list of command line installs

Code: Select all

history | grep apt > installsCLI.txt
installsCLI.txt is my name for the file

You can get rid of the command count in a spreadsheet (there is a more techie way using awk and sed but I could not work out the command parameters).
Cecilieaux
--
Every time I think I'm past newbiedom something like this happens.
Running Linux Mint 21 Vera with Cinnamon.
Locked

Return to “Beginner Questions”