Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: How to know all installed packages

  1. #1

    Default How to know all installed packages

    hi all
    How to know all installed packages ?

    im test in konsole

    Code:
    rpm -qa | less
    its not good ( konsole Do not save lines many )
    ===================0-==- -==-0======================

    -=-

    oooooo

  2. #2
    Join Date
    Dec 2010
    Location
    California, USA
    Posts
    50

    Default Re: How to know all installed packages

    Do you want a list of RPMs or the actual packages as known by YaST?

    For the former, I take it your complaint is that you don't know how to save the output of rpm.
    Try this:
    Code:
    rpm -qa > /tmp/mypackages.txt
    You can then open /tmp/mypackages.txt in your favourite text editor.

    Alternatively, try going to "Software Management" in YaST, and then doing File > Export, and placing the file in a location you find convenient.
    Then, open it with your favourite text editor or web browser.

    HTH
    SuperMicro P4SCE (Pentium 4 HT)
    3 GB DDR1 RAM
    nVidia GeForce FX 5500
    openSUSE 12.3(3.7.10-1.36-desktop) XFCE

  3. #3
    Join Date
    Jul 2008
    Location
    Seattle, WA
    Posts
    17,039

    Default Re: How to know all installed packages

    On Thu, 18 Sep 2014 03:16:01 +0000, maxray wrote:

    > hi all
    > How to know all installed packages ?
    >
    > im test in konsole
    >
    >
    > Code:
    > --------------------
    > rpm -qa | less
    > --------------------
    >
    >
    > its not good ( konsole Do not save lines many )


    Use:

    Code:
    rpm qa > file.txt
    Then open the file in your favourite text editor.

    Jim



    --
    Jim Henderson
    openSUSE Forums Administrator
    Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

  4. #4
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: How to know all installed packages

    On 2014-09-18 05:16, maxray wrote:
    >
    > hi all
    > How to know all installed packages ?
    >
    > im test in konsole
    >
    >
    > Code:
    > --------------------
    > rpm -qa | less
    > --------------------
    >
    >
    > its not good ( konsole Do not save lines many )



    Well, that is what 'less' is for. Just page up and down as needed.

    Hint: 'less' has help on 'h'.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 13.1 x86_64 "Bottle" at Telcontar)

  5. #5

    Default Re: How to know all installed packages

    Thanks for all
    I like this

    Code:
    rpm -qa --qf "%{NAME}\n" > /tmp/mypackages.txt
    ===================0-==- -==-0======================

    -=-

    oooooo

  6. #6

    Default Re: How to know all installed packages

    My question is, why do you need to know all the packages installed? or what is the end goal. Note that also print patches and pattern AFAIK.

    Another option would be parsing the output of zypper but it might be printing patches and patterns too.
    Code:
    zypper se -si | awk '/^i/{print $3}'
    "Unfortunately time is always against us" -- [Morpheus]

    .:https://github.com/Jetchisel:.

  7. #7

    Default Re: How to know all installed packages

    Right it does print patch and pattern

    Code:
    zypper se -si | awk '/^i/ && $5 !~ /package/' | less
    Or

    Code:
    zypper se -si | awk '/^i/ && $5 !~ /package/{printf("%-20s %s\n", $3, $5)}' | less
    "Unfortunately time is always against us" -- [Morpheus]

    .:https://github.com/Jetchisel:.

  8. #8
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: How to know all installed packages

    On 2014-09-20 05:46, jetchisel wrote:
    >
    > Right it does print patch and pattern


    zypper does, but rpm, which what maxray is using, doesn't :-)

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 13.1 x86_64 "Bottle" at Telcontar)

  9. #9

    Default Re: How to know all installed packages

    but it prints gpg-pubkeys at least for me.

    Code:
    rpm -qa --qf '%{NAME}\n' | grep gpg-pubkey
    Code:
    rpm -qa gpg-pubkey
    gpg-pubkey-1abd1afb-54176598
    gpg-pubkey-1c9d570b-53425542
    gpg-pubkey-7fac5991-4615767f
    gpg-pubkey-72174fc2-5226025d
    gpg-pubkey-866612e7-5197f6b1
    gpg-pubkey-307e3d54-4be01a65
    gpg-pubkey-3dbdc284-53674dd4
    gpg-pubkey-6867f5be-4d77cecd
    gpg-pubkey-c66b6eae-4491871e
    gpg-pubkey-98ab5139-4bf2d0b0
    Not sure if that matters though but i did some more digging and here it is.

    If you take a look deeper rpm prints gpg-pubkey and zypper does not.


    Running diff between the output of rpm and zypper.


    Code:
    diff <(rpm -qa --qf '%{NAME}\n'| sort) <(zypper se -si | awk '/^i/ && $5 ~ /package/{print $3}'| sort)

    Or using comm.


    Code:
    comm -3 <(rpm -qa --qf '%{NAME}\n'| sort) <(zypper se -si | awk '/^i/ && $5 ~ /package/{print $3}'| sort)

    Counting all the package via rpm


    Code:
    rpm -qa --qf '%{NAME}\n'| wc -l

    Also via zypper


    Code:
    zypper se -si | awk '/^i/ && $5 ~ /package/{print $3}'|wc -l

    It should give different results, at least i have different results .


    If you skip gpg-pubkey when using rpm that might do the trick though.


    Code:
    rpm -qa --qf '%{NAME}\n'| awk '!/gpg-pubkey/'

    Code:
    rpm -qa --qf '%{NAME}\n'|awk '!/gpg-pubkey/' | wc -l

    Now check those output with diff and comm.


    Code:
    diff <(rpm -qa --qf '%{NAME}\n'| awk '!/gpg-pubkey/'| sort) <(zypper se -si | awk '/^i/ && $5 ~ /package/{print $3}'| sort)
    echo $?
    0
    Zero means that both output has the same result, which means success. Comments and criticism are welcome anytime .
    "Unfortunately time is always against us" -- [Morpheus]

    .:https://github.com/Jetchisel:.

  10. #10

    Default Re: How to know all installed packages

    Sorry here is the comm
    Code:
    comm -3 <(rpm -qa --qf '%{NAME}\n'| awk '!/gpg-pubkey/'| sort) <(zypper se -si | awk '/^i/ && $5 ~ /package/{print $3}'| sort)
    echo $?
    0
    "Unfortunately time is always against us" -- [Morpheus]

    .:https://github.com/Jetchisel:.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •