You are not logged in.

#1 2010-06-19 01:31:43

trusktr
Banned
From: .earth
Registered: 2010-02-18
Posts: 907
Website

How to determine if package was installed explicitly using pacman -S?

How can i determine exactly which packages were explicitly installed using the "pacman -S PACKAGE " method, but exclude packages that were installed as dependancies of explicit packages?

For example, if I type pacman -Qet, I get a list a "explicitly installed" packages but i see in there some packages that i never manually typed "pacman -S" to install. I believe they must have been installed as dependancies to explicitly installed packages.

Any way to show only packages on which you explicitly used the pacman -S command?


joe@trusktr.io - joe at true skater dot io.

Offline

#2 2010-06-19 01:36:50

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,799
Website

Re: How to determine if package was installed explicitly using pacman -S?

1) man pacman

2) pacman -Qe will only list those explicitly installed. promise.  if you're suspicious then use pacman -Qi <package> | grep ^Install\ Reason to see for yourself

Offline

#3 2010-06-19 01:47:23

Xyne
Forum Fellow
Registered: 2008-08-03
Posts: 6,965
Website

Re: How to determine if package was installed explicitly using pacman -S?

trusktr wrote:

For example, if I type pacman -Qet, I get a list a "explicitly installed" packages but i see in there some packages that i never manually typed "pacman -S" to install. I believe they must have been installed as dependancies to explicitly installed packages.

-Qet lists only the top-level (i.e. packages which are not required by other packages) explicitly installed packages. If there is something there that you don't remember installing with -S, it may be part of a group that you've explicitly installed (base, base-devel, xorg, lxde, kde, gnome, etc).


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#4 2010-06-19 01:49:36

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,672
Website

Re: How to determine if package was installed explicitly using pacman -S?

"pacman -Qi pkg" and look at "Install Reason"

Offline

#5 2010-06-19 01:55:25

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,799
Website

Re: How to determine if package was installed explicitly using pacman -S?

brisbin33 wrote:

pacman -Qi <package> | grep ^Install\ Reason

Allan wrote:

"pacman -Qi pkg" and look at "Install Reason"

Jinx smile

Offline

#6 2010-06-19 02:05:45

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,672
Website

Re: How to determine if package was installed explicitly using pacman -S?

You can not jinx someone if you say the same thing six minutes after! big_smile

Offline

#7 2010-06-19 02:26:33

trusktr
Banned
From: .earth
Registered: 2010-02-18
Posts: 907
Website

Re: How to determine if package was installed explicitly using pacman -S?

Hmmmm... well see, i have never explicitly installed "cups" but there is no package group that it belongs to either! I kinda know what cups does (allows your computer to be a print server, out pdfs, etc) but I can't tell exactly how/why it was installed on my system so I'm not sure if I need it or not! It also happens to be listed as a top level package (pacman -Qet).

I've kept a detailed log of everything i've installed, and i didn't install cups so i was just curious (my dad doesn't remember installing it). roll

It'd be very useful if pacman also included in pacman.log the actual command used, before listing a chain of actions.

Currently we see in the log a continuous list of "installed, upgraded, removed, etc" So if you do pacman -Syu, for example, pacman would add many "upgraded" lines to the log.

What would be neato is if pacman added one single line that showed the command used (e.g. pacman -Syu) before all of the rest of the lines were added.

So instead of having this:

...
...
[2010-02-19 16:30] installed libtasn1 (2.4-1)
[2010-02-19 16:30] installed gnutls (2.8.5-1)
[2010-02-19 16:30] installed libxml2 (2.7.6-2)
[2010-02-19 16:30] installed c-ares (1.7.0-2)
[2010-02-19 16:30] installed aria2 (1.8.2-1)
[2010-02-19 16:30] installed perl-xyne-common (2010.02.11.1-1)
[2010-02-19 16:30] installed perl-uri (1.52-1)
[2010-02-19 16:30] installed perl-html-tagset (3.20-1)
[2010-02-19 16:30] installed perl-html-parser (3.64-1)
[2010-02-19 16:30] installed perl-libwww (5.834-2)
[2010-02-19 16:30] installed perl-xyne-arch (2010.02.18.1-1)
[2010-02-19 16:30] installed powerpill (17.0-4)
[2010-02-19 16:31] upgraded sudo (1.7.2p3-1 -> 1.7.2p3-1)
[2010-02-19 16:31] Updating vi help tags...done.
[2010-02-19 16:31] installed vim (7.2.359-1)
...
...

You'd have something like this:

...
...
command: pacman -S powerpill
[2010-02-19 16:30] installed libtasn1 (2.4-1)
[2010-02-19 16:30] installed gnutls (2.8.5-1)
[2010-02-19 16:30] installed libxml2 (2.7.6-2)
[2010-02-19 16:30] installed c-ares (1.7.0-2)
[2010-02-19 16:30] installed aria2 (1.8.2-1)
[2010-02-19 16:30] installed perl-xyne-common (2010.02.11.1-1)
[2010-02-19 16:30] installed perl-uri (1.52-1)
[2010-02-19 16:30] installed perl-html-tagset (3.20-1)
[2010-02-19 16:30] installed perl-html-parser (3.64-1)
[2010-02-19 16:30] installed perl-libwww (5.834-2)
[2010-02-19 16:30] installed perl-xyne-arch (2010.02.18.1-1)
[2010-02-19 16:30] installed powerpill (17.0-4)
command: pacman -S vim
[2010-02-19 16:31] upgraded sudo (1.7.2p3-1 -> 1.7.2p3-1)
[2010-02-19 16:31] Updating vi help tags...done.
[2010-02-19 16:31] installed vim (7.2.359-1)
command: pacman...
...
...

or, as in the following example, one might be able to tell why something was installed and then removed various times (e.g. finding a front end for something then uninstalling the backend so that it is not labeled as "explicitly installed" by pacman) :

...
...
command: pacman -S recordmydesktop
[2010-06-14 19:35] installed recordmydesktop (0.3.8.1-4)
command: pacman -Rsu recordmydesktop
[2010-06-14 20:14] removed recordmydesktop (0.3.8.1-4)
command: pacman -Sy gtk-recordmydesktop
[2010-06-14 20:15] installed recordmydesktop (0.3.8.1-4)
[2010-06-14 20:15] installed gtk-recordmydesktop (0.3.8-2)
command: pacman -Rsun xvidcap
[2010-06-14 20:45] removed xvidcap (1.1.7-3)
...
...

(xvidcap removed after testing both to see which one was better) smile


Then we'd be certain of what had happened for sure for sure!

Last edited by trusktr (2010-06-19 02:54:32)


joe@trusktr.io - joe at true skater dot io.

Offline

#8 2010-06-19 07:22:55

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: How to determine if package was installed explicitly using pacman -S?

Post a feature request in the bugtracker, under the pacman project.

Offline

#9 2010-06-19 07:54:41

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,672
Website

Re: How to determine if package was installed explicitly using pacman -S?

He has...  it was closed as implemented in pacman-3.4.   We a just that fast at implementing new features!  tongue

Offline

#10 2010-06-19 09:25:42

trusktr
Banned
From: .earth
Registered: 2010-02-18
Posts: 907
Website

Re: How to determine if package was installed explicitly using pacman -S?

haha awesome!


joe@trusktr.io - joe at true skater dot io.

Offline

Board footer

Powered by FluxBB