Log of installed software? (not default, not libs) <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
User avatar
catweazel
Level 10
Level 10
Posts: 3331
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

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

Postby catweazel » Thu Sep 28, 2017 5:58 am

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?
If your problem is fixed, please mark your thread as [SOLVED] by editing the title of the first message in the thread.

cecilieaux
Level 4
Level 4
Posts: 389
Joined: Mon Dec 09, 2013 9:43 am

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

Postby cecilieaux » Thu Sep 28, 2017 8:41 am

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.

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

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

Postby karlchen » Thu Sep 28, 2017 8:49 am

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
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.

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

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

Postby Termy » Thu Sep 28, 2017 9:15 am

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.
Here to help.

ColdBootII
Level 3
Level 3
Posts: 169
Joined: Wed Aug 02, 2017 8:19 am

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

Postby ColdBootII » Thu Sep 28, 2017 12:41 pm

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

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

Postby Termy » Thu Sep 28, 2017 1:12 pm

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. :)
Here to help.

User avatar
BG405
Level 5
Level 5
Posts: 829
Joined: Fri Mar 11, 2016 3:09 pm
Location: England

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

Postby BG405 » Thu Sep 28, 2017 6:46 pm

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-------------------Acer D255E 2GB - LM17.3 KDE 32
Toshiba NB305 - LM17.3 Xfce 32--------------------K7S5A Athlon 1.2GHz - LM17.3 Xfce 32 & WinXP-Pro
Acer Aspire E11 ES1-111M - LM18.2 KDE 64 -----Dell PII 350 64MB - Puppy 4.3 & Win98-SE

TI58C
Level 3
Level 3
Posts: 155
Joined: Tue Jul 18, 2017 5:57 am

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

Postby TI58C » Thu Sep 28, 2017 8:07 pm

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/questions/369136/list-top-level-manually-installed-packages-without-their-dependencies
https://unix.stackexchange.com/questions/3595/list-explicitly-installed-packages
And let's not forget
https://askubuntu.com/questions/2389/generating-list-of-manually-installed-packages-and-querying-individual-packages/492343#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 5
Level 5
Posts: 829
Joined: Fri Mar 11, 2016 3:09 pm
Location: England

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

Postby BG405 » Thu Sep 28, 2017 10:39 pm

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-------------------Acer D255E 2GB - LM17.3 KDE 32
Toshiba NB305 - LM17.3 Xfce 32--------------------K7S5A Athlon 1.2GHz - LM17.3 Xfce 32 & WinXP-Pro
Acer Aspire E11 ES1-111M - LM18.2 KDE 64 -----Dell PII 350 64MB - Puppy 4.3 & Win98-SE

ColdBootII
Level 3
Level 3
Posts: 169
Joined: Wed Aug 02, 2017 8:19 am

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

Postby ColdBootII » Fri Sep 29, 2017 12:23 am

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 3
Level 3
Posts: 155
Joined: Tue Jul 18, 2017 5:57 am

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

Postby TI58C » Fri Sep 29, 2017 12:28 am

@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
Level 3
Level 3
Posts: 169
Joined: Wed Aug 02, 2017 8:19 am

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

Postby ColdBootII » Fri Sep 29, 2017 2:02 am

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 3
Level 3
Posts: 155
Joined: Tue Jul 18, 2017 5:57 am

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

Postby TI58C » Fri Sep 29, 2017 12:53 pm

@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 3
Level 3
Posts: 155
Joined: Tue Jul 18, 2017 5:57 am

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

Postby TI58C » Sat Sep 30, 2017 7:42 am

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 4
Level 4
Posts: 389
Joined: Mon Dec 09, 2013 9:43 am

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

Postby cecilieaux » Tue Nov 07, 2017 12:37 pm

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.

User avatar
phd21
Level 13
Level 13
Posts: 4910
Joined: Thu Jan 09, 2014 9:42 pm
Location: Florida

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

Postby phd21 » Tue Nov 07, 2017 9:46 pm

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-packages-in-rhel-centos-fedora-debian-ubuntu-opensuse-arch-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 KDE 17.3 & 18.2, 64-bit Awesome OS, Ancient Dell OptiPlex 780 Core2Duo E8400 3GHz,3gb Ram,160gb hdd, Video: Intel 4 Graphics, DVD Lightscribe. Why I use KDE?:https://opensource.com/life/15/4/9-reasons-to-use-kde

aes2011
Level 4
Level 4
Posts: 290
Joined: Wed Jul 06, 2011 10:39 pm

Re: Log of installed software?

Postby aes2011 » Wed Nov 08, 2017 6:29 am

TI58C wrote:..., the last answer on this page https://unix.stackexchange.com/questions/12578/list-packages-on-an-apt-based-system-by-installation-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: 290
Joined: Wed Jul 06, 2011 10:39 pm

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

Postby aes2011 » Wed Nov 08, 2017 9:44 am

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

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

Postby Termy » Thu Nov 09, 2017 8:55 am

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.
Here to help.


Return to “Newbie Questions”