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.

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

Post by cecilieaux »

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
Last edited by cecilieaux on Fri Nov 24, 2017 5:37 pm, edited 4 times in total.
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: 18238
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Log of installed software?

Post by karlchen »

Hello, Cecilieaux.

The answer to your Linux Mint beginner's :wink: question can be found in the directory /var/log,
files: dpkg.log, dpkg.log.1, dpkg.log.2.gz ... dpkg.log.12.gz
These files can be opened and inspected e.g. with the help of gnome-system-log.

OK. This will list all activities, any package installation / update / removal. May need some filtering to reduce this to installed software ordered by name and date. :|

The Synaptic Package Manager history will present the same information in a more concise way.

On Mint 17.x Software Manager can be persuaded to display all installed applications. But it does not seem to offer a way of learning the installation days.

Last thing which comes to my mind is dpkg which can be instructed to list all installed software packages. Never checked whether it can display days of installation as well.

Hm, seems it is not quite as easy.

Best regards,
Karl
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 792 days now.
Lifeline
TI58C
Level 4
Level 4
Posts: 389
Joined: Tue Jul 18, 2017 5:57 am

Re: Log of installed software?

Post by TI58C »

On my 17.3 Mate system, the last answer on this page https://unix.stackexchange.com/question ... ation-date, works well (do read disclaimer there):

Code: Select all

for file_list in `ls -rt /var/lib/dpkg/info/*.list`; do \
    stat_result=$(stat --format=%y "$file_list"); \
    printf "%-50s %s\n" $(basename $file_list .list) "$stat_result"; \
done
This will show packages installed by Mintupdate , dpkg and synaptic.
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
karlchen
Level 23
Level 23
Posts: 18238
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Log of installed software?

Post by karlchen »

Hi, TI58C.

Hm. Yes, this commandline is great. Had come across this commandline before, but could not quite remember it. Wonder why?
Great! :)
Thanks.

Karl
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 792 days now.
Lifeline
cecilieaux
Level 5
Level 5
Posts: 742
Joined: Mon Dec 09, 2013 9:43 am
Location: Washington, D.C.

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

Post by cecilieaux »

I am finally ready to upgrade to Sarah, but I would like a list of programs 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)

I have tried

Code: Select all

dpkg -l > mypackages1.txt

dpkg --get-selections > mypackages2.txt

apt-cache pkgnames | sort > mypackages3.txt

zgrep -h ' install ' /var/log/dpkg.log* | sort -k4,4 | awk '{print $4}' > mypackages4.txt
but so far I get humongous lists with every last übergeeky library that was installed without my even knowing.

I mean a short, reasonable list of things I downloaded and would recognize "ah, yes, I should reinstall that" (or not).

Anyone have any ideas? I can't be the first human ever to think of this.

Thank all of you for what I am sure will be useful responses.

Cecilieaux
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: 18238
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Log of installed software?

Post by karlchen »

Hello, cecilieaux.

Your new thread has been combined with your initial thread.
Reason:
It is still the same topic. Opening several threads about the same topic is counterproductive. We would be going through the same list of advice that had been given in your original thread. Waste of time and energy.

About your wish / request / goal:

The software management system can tell you which software packages have been installed, because it stores management information about its activities.
The software management system does so on package level.
What we perceive as a single software product like e.g. Libre Office, consists of a number of software packages.
We look at and think of groups of packages, Libre Office, but the software management system manages packages.

The software management system does not care whether software packages have come pre-installed or whether you have added them later on. So I do not think there is an easy way of extracting only the software packages, which have not come pre-installed.

The software management system has got no knowledge at all about software which has been installed not using the software management system (Software Manager, Synaptic, apt-get, dpkg): binaries from tar.gz or .tar.bz2 archive, software installed by compiling from source code etc pp.
There is no automated way of collecting lists of manually installed software outside the software management system.
Keeping track of such software installations is your responsibility only.

This is why do it the other way round:
I maintain a simple Libre Office Calc table of all the software (not every single package) which I add to my systems.
Though I have done so since Mint 13, this list has turned out to be pretty stable over the years and Mint versions and not to grow endlessly long (roughly 70 rows).


Now let us hope that someone turns up who knows better than me and who offers a useful piece of advice which has not already been given to you and discarded by you.

Best regards,
Karl
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 792 days now.
Lifeline
cecilieaux
Level 5
Level 5
Posts: 742
Joined: Mon Dec 09, 2013 9:43 am
Location: Washington, D.C.

Re: Log of installed software?

Post by cecilieaux »

karlchen wrote:Hello, cecilieaux.

Your new thread has been combined with your initial thread.

The software management system does not care whether software packages have come pre-installed or whether you have added them later on. So I do not think there is an easy way of extracting only the software packages, which have not come pre-installed.

I maintain a simple Libre Office Calc table of all the software (not every single package) which I add to my systems.
Now let us hope that someone turns up who knows better than me and who offers a useful piece of advice which has not already been given to you and discarded by you.

Karl
Combine away. The problem was unresolved.

I would beg to differ that the "system does not care." It cares enough to place certain files in certain directories, to check for dependencies and download files to fix them. The system understands that Libre Office, although it has many parts is one applications suite.

It also understand what comes with the system.

I am just a lowly user, not a programmer, but if the system can be made to track the 80 or so little programs that go into LO and to know to install a new one with the new OS, there must be a way to record that and to distinguish between the suite as a whole and the libraries and to distinguish what was installed with the OS from what was not.

So I am confident that someone will have an answer that shows *how* a user can draw out that information.
Cecilieaux
--
Every time I think I'm past newbiedom something like this happens.
Running Linux Mint 21 Vera with Cinnamon.
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 »

[edited]
Hi Cecillieaux,

Karlchen wrote:
This is why do it the other way round:
I maintain a simple Libre Office Calc table of all the software (not every single package) which I add to my systems.
Though I have done so since Mint 13, this list has turned out to be pretty stable over the years and Mint versions and not to grow endlessly long (roughly 70 rows)
I have tried doing just that, but am just not disciplined enough. When I install a newer Mint version, I usually restore the total package list produced by Mint backup tool, then do update and restore home dir, being careful with the hidden (config) dirs. Have had surprisingly little problems with this method.

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 should (tentatively) even be possible to feed such a short-list to aptitude or dpkg to reinstall them on a brand-new clean install.

As I said, maybe just some hot air. But it is something I'm interested in. Mostly I remember some useful packages like wmctrl,xdotool, linssid etc, but I have hunted some program I knew I had used before in an earlier version, but just couldn't remember.

On the other hand, losing stuff that you have not used for a long time is an organising principle too. My garage and toolboxes work the same way. "Organized chaos" :)

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 »

TI58C wrote:[edited]
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). It should (tentatively) even be possible to feed such a short-list to aptitude or dpkg to reinstall them on a brand-new clean install.

On the other hand, losing stuff that you have not used for a long time is an organising principle too.

Robert
I like both ideas. The first will take a fair amount of time. The second is what actually happens, I guess.
Cecilieaux
--
Every time I think I'm past newbiedom something like this happens.
Running Linux Mint 21 Vera with Cinnamon.
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 »

Folks, I have found two possibilities.

1) At https://www.linuxquestions.org/question ... es-944087/, there's the suggestion of a log and info approach using dpkg. I am still not clear on what this does. Looked at the output and it seems interesting but I don understand how these lists are organized. LOTS to learn!!!

2) I discovered a program I had never heard of called Stow (https://www.gnu.org/software/stow/). It says
GNU Stow is a symlink farm manager which takes distinct packages of software and/or data located in separate directories on the filesystem, and makes them appear to be installed in the same place. For example, /usr/local/bin could contain symlinks to files within /usr/local/stow/emacs/bin, /usr/local/stow/perl/bin etc., and likewise recursively for any other subdirectories such as .../share, .../man, and so on.
This is particularly useful for keeping track of system-wide and per-user installations of software built from source, but can also facilitate a more controlled approach to management of configuration files in the user's home directory, especially when coupled with version control systems.
Getting closer but not quite there. Maybe we (I) need an installer and uninstaller that keeps track of what is installed and uninstalled and from what source. Would not know how to write such a thing. Maybe next year, when I am retired.
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)

Post by phd21 »

Hi "cecilieaux",

I just read your post and some of the good and interesting replies to it. Here are my thoughts on this as well.

How about installing "Aptik" and trying that? It will show a list of installed applications and more.

Aptik website - their "homepage" has links to download the 32-bit or 64-bit easy installer Aptik ".deb" file.
http://www.teejeetech.in/2014/01/introducing-aptik.html
To install this using the PPA method, open a console terminal, type in, or copy & paste, each line below one by one: Click "Select All" above command, right click the highlighted command, select Copy (or Ctrl+Insert), click in the console terminal window, and right click paste (or Shift+Insert), repeat for each command.

Code: Select all

sudo apt-add-repository ppa:teejee2008/ppa

Code: Select all

sudo apt-get update

Code: Select all

sudo apt-get install aptik
[/color]

Hope this helps ...
Last edited by phd21 on Tue Sep 05, 2017 12:13 pm, 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
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,


Go ahead, try anything. But...
Neither "stow" nor your "keeping track of" website adds anything new. Cannot say anything about aptik, but do have doubts. Will check.

All use the same sources. So why expect anything better/different. they all basically do more or less the same. What is not there cannot be produced.

Keeping track of new installs is not that difficult. Use one-liner above >list0. Install stuff. Use oneliner again > list1. Compare lists. Done. Show me how the methods you found do anything differently / better.

You, ceclilieaux, have to understand linux is NOT like windows. linux is buit up on the basis of a gazillion (small) packages that each "do one thing and do it well". What you want is not compatible with how the system (linux/Mint) was designed to operate.

Robert
Last edited by TI58C on Tue Sep 05, 2017 11:37 am, edited 1 time in total.
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
karlchen
Level 23
Level 23
Posts: 18238
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

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

Post by karlchen »

Hi, cecilieaux.

The software Aptik which phd21 has recommended should come closest to what you wish to achieve.
Among other things it permits you to backup a list of top-level software packages (which should be close to the software products which you are after) and to apply the backed up list on a new system.
Checked the PPA page on Launchpad: seems to suggest that the software is still actively maintained. Which is not irrelevant.
Best you check it out yourself.

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

[quote="phd21"]Hi "cecilieaux",

I just read your post and some of the good and interesting replies to it. Here are my thoughts on this as well.

How about installing "Aptik" and trying that? It will show a list of installed applications and more.

Code: Select all

sudo apt-add-repository ppa:teejee2008/ppa
Result:

Code: Select all

Gtk-Message: Failed to load module "unity-gtk-module"
You are about to add the following PPA to your system:
 More info: https://launchpad.net/~teejee2008/+archive/ubuntu/ppa
Halted. Weird.
Cecilieaux
--
Every time I think I'm past newbiedom something like this happens.
Running Linux Mint 21 Vera with Cinnamon.
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,

Be assured I will try Aptik. It looks so promising...
At the very least, I should thank you for that. Very interested

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 »

phd21 wrote: How about installing "Aptik" and trying that? It will show a list of installed applications and more.
On second thought, went to install Aptik in the Software Manager and I already had it installed. Backed up downloaded programs (it included lots of stuff (124 items, including 22 libreoffice files) I know comes with Linux Mint, but OK.

Maybe next year I will write the tool and become famous. Then again, maybe not.

C
Cecilieaux
--
Every time I think I'm past newbiedom something like this happens.
Running Linux Mint 21 Vera with Cinnamon.
User avatar
MrEen
Level 23
Level 23
Posts: 18343
Joined: Mon Jun 12, 2017 8:39 pm

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

Post by MrEen »

Well, this may help you get your tool started:

In /var/log/apt/ you'll see history.log (as well as history.log.#.gz) that might prove somewhat useful.

Installed (by you) items that required no depedancies look something like this:

Code: Select all

Start-Date: 2017-08-10  16:24:06
Requested-By: username (1000)
Install: keepassx:amd64 (2.0.2-1)
End-Date: 2017-08-10  16:24:31
The filtering could look for the "Install:" to avoid adding updates.

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.
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 »

MrEen wrote:Well, this may help you get your tool started:

In /var/log/apt/ you'll see history.log (as well as history.log.#.gz) that might prove somewhat useful.

At the very least, the logs can be sifted with the users own eyes to build a list on their own.
I will try this, Thanks!

OK, I want to thank everyone. I realize that I'm asking for the 5-wheeled car of Linux Mint.
Cecilieaux
--
Every time I think I'm past newbiedom something like this happens.
Running Linux Mint 21 Vera with Cinnamon.
User avatar
BG405
Level 9
Level 9
Posts: 2510
Joined: Fri Mar 11, 2016 3:09 pm
Location: England

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

Post by BG405 »

I just did this cat ~/.bash_history | grep apt-get > /mnt/SERVER/LOGS/apt-get_log.txt && nano /mnt/SERVER/LOGS/apt-get_log.txt to generate a list of software installed via the Terminal, which is how I usually install stuff, and thought I'd post this in case it's any help for the OP or anyone else reading this. You can ignore the && nano and following; I just did this to check the file had been written properly.
So, cat ~/.bash_history | grep apt-get > /path-to-file/apt-get_log.txt putting in your desired path & filename should suffice for the installs you did using the Terminal.

Obviously substitute "apt-get" with "apt" if that is what you use.

There will be a few unwanted entries to get rid of but that shouldn't be an issue.
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 »

@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
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”