[SOLVED] Any log system for software installs?

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Mintymandy34

[SOLVED] Any log system for software installs?

Post by Mintymandy34 »

I often install a lot of softwares from software manager to test them out.
Newbie, so wandering a lot in the Software Manager to find the right package.
In some cases, the software tells me that it'll need to install a lot of dependencies along with itself. (Not talking about flatpaks here, just the normal section)
When I want to remove such application, I hit uninstall from the Mint menu.
However I doubt that the dependencies it installed still stay back, and I would want to remove them if they're unnecessary.
I know about Synaptic Package Manager and its complete removal feature, though I'm not sure if it removes the dependencies along with the software.
Please correct me on that.


My question is, is there any log system used for Software installs, kinda like one used for Timeshift, which I can use to find out stuff I had installed mistakenly and now could remove through the Software Manager.
Is there such a log system that keeps track of my installs and would it be convenient to use for my purpose?
If not, can you please share alternatives for my scenario.


SOLUTION:

For Logs, open Synaptic Package Manager, then File > History.

Logs for deb installs, last 2 months:

Code: Select all

grep -Poz "(?s)(?<=startup archives install).*?(?=startup)" /var/log/dpkg.log.1 /var/log/dpkg.log | grep -Pa "install |upgrade "

Addendums:

Code: Select all

apt-mark showmanual
Use this to get a list of anything you have specifically installed via apt, synaptic or software manager plus most of the main applications in Mint.

Code: Select all

ls -rv /var/log/dpkg.log*|xargs zcat -f|grep -Poz "(?s)(?<=startup archives install).*?(?=startup)"|grep -Pa "install |upgrade "
Logs for deb installs, long enough.

For checking availability of deb installs:

apt install apt-show-versions then

apt-show-versions | grep "No" for debs with no other version in the repos.

apt-show-versions | grep "newer" for debs that you have installed to get a newer version than in the repos

Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
smurphos
Level 18
Level 18
Posts: 8498
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: Any log system for software installs?

Post by smurphos »

You can remove any unnecessary dependencies via the command line or via synaptic.

Command line

apt autoremove --purge

In Synaptic, select Status - if there is anything autoremovable it will be listed. Also note the residual config category.....

Image

Package management logs - look in /var/log/apt

Also Synaptic has a history function - File > History....
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
Mintymandy34

Re: Any log system for software installs?

Post by Mintymandy34 »

smurphos wrote: Sat Feb 16, 2019 3:24 am You can remove any unnecessary dependencies via the command line or via synaptic.

Command line

apt autoremove --purge

In Synaptic, select Status - if there is anything autoremovable it will be listed. Also note the residual config category.....

Image

Package management logs - look in /var/log/apt

Also Synaptic has a history function - File > History....
Thanks, that answered all my questions. 😀
smurphos wrote: Sat Feb 16, 2019 3:24 am In Synaptic, select Status - if there is anything autoremovable it will be listed. Also note the residual config category.....
I have a lot of entries in that autoremovable section and a few in residual config category.
Is it safe to mark all of them to complete removal?
User avatar
smurphos
Level 18
Level 18
Posts: 8498
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: Any log system for software installs?

Post by smurphos »

Yes it should be safe. Hypothetically a package might fail to declare all it's dependencies properly and something might get removed that is still needed for an installed package but I've never personally come across that scenario in 3 years plus of using Mint full-time. I routinely use the command line version every couple of weeks.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
Mintymandy34

Re: Any log system for software installs?

Post by Mintymandy34 »

smurphos wrote: Sat Feb 16, 2019 3:53 am Yes it should be safe. Hypothetically a package might fail to declare all it's dependencies properly and something might get removed that is still needed for an installed package but I've never personally come across that scenario in 3 years plus of using Mint full-time. I routinely use the command line version every couple of weeks.
Nice.
Thanks.
I however noticed that the history section doesn't show records for installs from deb files.
Is that normal?
User avatar
smurphos
Level 18
Level 18
Posts: 8498
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: Any log system for software installs?

Post by smurphos »

Hadn't noticed that before, but it appears to be. One other log location that does reference direct deb installs -

/var/log/dpgk.log

In Synaptic deb installed packages should be listed as Installed (local or obsolete) if the same version isn't actually in the repos somewhere.

In Software Sources they will also be listed as candidates for removal in the Remove Foreign Packages GUI.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
Neil Darlow

Re: Any log system for software installs?

Post by Neil Darlow »

Be very careful when uninstalling from the Locally installed and obsolete section. There are a lot of required packages that are listed there.
User avatar
Gruppo Sportivo
Level 4
Level 4
Posts: 276
Joined: Sun May 28, 2017 4:14 am
Location: 🇳🇱

Re: Any log system for software installs?

Post by Gruppo Sportivo »

Mintymandy34 wrote: Sat Feb 16, 2019 3:59 am I however noticed that the history section doesn't show records for installs from deb files.
Is that normal?
What is the outcome if you enter this command in the terminal

Code: Select all

apt-mark showmanual
showmanual can be used in the same way as showauto except that it will print a list of
manually installed packages instead.
Mintymandy34

Re: Any log system for software installs?

Post by Mintymandy34 »

Gruppo Sportivo wrote: Sat Feb 16, 2019 4:53 am
Mintymandy34 wrote: Sat Feb 16, 2019 3:59 am I however noticed that the history section doesn't show records for installs from deb files.
Is that normal?
What is the outcome if you enter this command in the terminal

Code: Select all

apt-mark showmanual
showmanual can be used in the same way as showauto except that it will print a list of
manually installed packages instead.
Yes, this shows the debs installed.
However they're not timed, instead alphabetically sorted, so there's no idea what was installed when.
Still I think, this is really helpful for I could get a list of softwares that I've installed, including the debs.
So, thanks for that command.😀
Mintymandy34

Re: Any log system for software installs?

Post by Mintymandy34 »

smurphos wrote: Sat Feb 16, 2019 4:29 am In Synaptic deb installed packages should be listed as Installed (local or obsolete) if the same version isn't actually in the repos somewhere.
Yup, had noticed that.
Problem is debs are missing from the history and so I've no idea when I installed them, but I guess, I could use the different sections to zero in on the packages I've installed.
smurphos wrote: Sat Feb 16, 2019 4:29 am In Software Sources they will also be listed as candidates for removal in the Remove Foreign Packages GUI.
I didn't know that, that's great.
Everything is linked everywhere, I could find them from either of those apps.
Neil Darlow wrote: Sat Feb 16, 2019 4:51 am Be very careful when uninstalling from the Locally installed and obsolete section. There are a lot of required packages that are listed there.
Currently I've 4 entries of deb packages present in that section, I've installed them.
But yes, I'll collect this warning and be careful from now on when I uninstall from that section.
And by careful, you meant, not uninstall or check on the forums/internet if it's safe to uninstall them?

Thank you all for your answers.
Really helpful.

Knowing the time of install helps when I break my system due to installing some app and can't figure out what was installed along with the said software, and the dependency might be the reason of conflict.
They'll be installed in nearly the same timeframes and so it'll be easy to detect that conflict and remove the conflicting package.
I hope, I make some sense.
Or maybe my method is flawed.
If so, correct me on that.
gm10

Re: Any log system for software installs?

Post by gm10 »

smurphos wrote: Sat Feb 16, 2019 3:53 am Yes it should be safe. [...] I routinely use the command line version every couple of weeks.
Safe enough. I finally got Clem to commit my feature to automate that via Update Manager, will be an option in 19.2.

Note that when removing pre-installed software, dependencies stay in place and cannot be removed that way.
Mintymandy34 wrote: Sat Feb 16, 2019 5:39 am Knowing the time of install helps when I break my system due to installing some app and can't figure out what was installed along with the said software, and the dependency might be the reason of conflict.
Challenge accepted:

Code: Select all

grep -Poz "(?s)(?<=startup archives install).*?(?=startup)" /var/log/dpkg.log.1 /var/log/dpkg.log | grep -Pa "install |upgrade "
That gives you a dated listing of all the .deb installs you did in the last two calendar months.
Mintymandy34

Re: Any log system for software installs?

Post by Mintymandy34 »

gm10 wrote: Sat Feb 16, 2019 5:53 am
smurphos wrote: Sat Feb 16, 2019 3:53 am Yes it should be safe. [...] I routinely use the command line version every couple of weeks.
Safe enough. I finally got Clem to commit my feature to automate that via Update Manager, will be an option in 19.2.
Thanks.
By the way, do we've any inside detail about 19.2's release dates? :wink:
gm10 wrote: Sat Feb 16, 2019 5:53 am Note that when removing pre-installed software, dependencies stay in place and cannot be removed that way.
Noted.
And my notebook is filling up with notes. :D

Mintymandy34 wrote: Sat Feb 16, 2019 5:39 am Knowing the time of install helps when I break my system due to installing some app and can't figure out what was installed along with the said software, and the dependency might be the reason of conflict.
gm10 wrote: Sat Feb 16, 2019 5:53 am

Code: Select all

grep -Poz "(?s)(?<=startup archives install).*?(?=startup)" /var/log/dpkg.log.1 /var/log/dpkg.log | grep -Pa "install |upgrade "
That gives you a dated listing of all the .deb installs you did in the last two calendar months.
Great.
Thanks a lot.
That command is awesome. 🤩

I think, all my questions are answered.
Time to mark this as solved. 😎
Thank you all for your answers.
Truly appreciate you all. 😇
Last edited by Mintymandy34 on Sat Feb 16, 2019 6:03 am, edited 1 time in total.
User avatar
smurphos
Level 18
Level 18
Posts: 8498
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: Any log system for software installs?

Post by smurphos »

Gruppo Sportivo wrote: Sat Feb 16, 2019 4:53 am

Code: Select all

apt-mark showmanual
apt-mark showmanual isn't just manually installed debs though.

These are just packages that are not treated as potential dependencies and so are never candidates for autoremove. Generally anything you have specifically installed via apt, synaptic or software manager plus most of the main applications in Mint.

I found this trying to work out a command line option to list what synaptic lists as obsolete packages (i.e packages not in the repos at all) which are always going to be manual deb installs.

https://askubuntu.com/questions/98223/h ... e-packages

apt install apt-show-versions then

apt-show-versions | grep "No" for debs with no other version in the repos.

apt-show-versions | grep "newer" for debs that you have installed to get a newer version than in the repos
Last edited by smurphos on Sat Feb 16, 2019 6:08 am, edited 1 time in total.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
User avatar
smurphos
Level 18
Level 18
Posts: 8498
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: Any log system for software installs?

Post by smurphos »

Neil Darlow wrote: Sat Feb 16, 2019 4:51 am Be very careful when uninstalling from the Locally installed and obsolete section. There are a lot of required packages that are listed there.
:?: Are you sure you don't mean the Installed (manually) status. The installed (local and obsolete) section only has packages that aren't in the repos for me. E.g they are either from deb installs or left overs from removed PPAs.
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
Mintymandy34

Re: Any log system for software installs?

Post by Mintymandy34 »

smurphos wrote: Sat Feb 16, 2019 6:02 am apt-mark showmanual isn't just manually installed debs though.

These are just packages that are not treated as potential dependencies and so are never candidates for autoremove. Generally anything you have specifically installed via apt, synaptic or software manager plus most of the main applications in Mint.

I found this trying to work out a command line option to list what synaptic lists as obsolete packages (i.e packages not in the repos at all) which are always going to be manual deb installs.
Yup, it did display a lot of softwares along with the debs.
Now, I know what all those softwares can include, thanks to you.
smurphos wrote: Sat Feb 16, 2019 6:02 am apt install apt-show-versions then

apt-show-versions | grep "No" for debs with no other version in the repos.

apt-show-versions | grep "newer" for debs that you have installed to get a newer version than in the repos
Tried this.
This helped isolating deb installs along with providing additional details about their availability.
Thanks.
Last edited by Mintymandy34 on Sat Feb 16, 2019 6:21 am, edited 1 time in total.
User avatar
smurphos
Level 18
Level 18
Posts: 8498
Joined: Fri Sep 05, 2014 12:18 am
Location: Irish Brit in Portugal
Contact:

Re: Any log system for software installs?

Post by smurphos »

gm10 wrote: Sat Feb 16, 2019 5:53 am Challenge accepted:

Code: Select all

grep -Poz "(?s)(?<=startup archives install).*?(?=startup)" /var/log/dpkg.log.1 /var/log/dpkg.log | grep -Pa "install |upgrade "
That gives you a dated listing of all the .deb installs you did in the last two calendar months.
Can you make it enumerate any older compressed logs as-well. In one line of course.... :wink:
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
Mintymandy34

Re: Any log system for software installs?

Post by Mintymandy34 »

smurphos wrote: Sat Feb 16, 2019 6:16 am
gm10 wrote: Sat Feb 16, 2019 5:53 am Challenge accepted:

Code: Select all

grep -Poz "(?s)(?<=startup archives install).*?(?=startup)" /var/log/dpkg.log.1 /var/log/dpkg.log | grep -Pa "install |upgrade "
That gives you a dated listing of all the .deb installs you did in the last two calendar months.
Can you make it enumerate any older compressed logs as-well. In one line of course.... :wink:
The awesomeness bar will go beyond the scales.
I love this. :D
gm10

Re: Any log system for software installs?

Post by gm10 »

Mintymandy34 wrote: Sat Feb 16, 2019 6:00 am By the way, do we've any inside detail about 19.2's release dates? :wink:
That's no secret, we do 3 point releases between major releases. Major releases are every 2 years, thus point releases are roughly every 6 months in-between. 19.1 was end of last year, so 19.2 will be middle of this year.
smurphos wrote: Sat Feb 16, 2019 6:16 am Can you make it enumerate any older compressed logs as-well. In one line of course.... :wink:
Considering the problem at hand is trouble-shooting bad packages, going back that far seems counter-productive. ;)

That said, sure I can, exact same length as the original version just to rub it in: :P 8)
Mintymandy34 wrote: Sat Feb 16, 2019 6:24 am The awesomeness bar will go beyond the scales.
You got that part right. ;)

Code: Select all

ls -rv /var/log/dpkg.log*|xargs zcat -f|grep -Poz "(?s)(?<=startup archives install).*?(?=startup)"|grep -Pa "install |upgrade "
Mintymandy34

Re: Any log system for software installs?

Post by Mintymandy34 »

gm10 wrote: Sat Feb 16, 2019 6:41 am

Code: Select all

ls -rv /var/log/dpkg.log*|xargs zcat -f|grep -Poz "(?s)(?<=startup archives install).*?(?=startup)"|grep -Pa "install |upgrade "
Can you rebuild Rome?
Yes, you can. :D
Locked

Return to “Software & Applications”