Results 1 to 9 of 9

Thread: How to query the number of available packages

  1. #1
    Join Date
    Feb 2013
    Location
    Los Angeles, California, USA
    Posts
    3

    Question How to query the number of available packages

    Greetings!

    I've been using Linux for 14 years, mostly Fedora, Gentoo, FreeBSD and Linux Mint, but just decided to switch to openSUSE, as it seems the only logical thing to do, having found out, after long hours of research on Distrowatch and the Web in general, that it's the best distro in existence =) So I installed the KDE desktop version of openSUSE 11.2 (19 days before 11.3 I know right? ) and am *loving* it even more than I thought I would. The ONLY problem I'm having so far is that I have as yet been unable to find any way to query YaST/Zypper to find out how many packages are available (both installed and not installed) in the various repositories.

    This may seem a curious request, as the exact number of packages is likely unimportant to most users, however I'd like to know how many there are, for statistical analysis and just out of curiosity. So is there a command or a script/application I can use to find this out? For instance, in Debian-based distros it's a fairly simple affair: just use `aptitude` and at the bottom of the nostalgia-inducing text-mode GUI it states "There are x packages available".

    I'd sincerely appreciate any assistance in this tiny matter, and patiently await the reply from any of you. Thank you very much in advance, and I look forward to being a productive and, hopefully, helpful member of the openSUSE community! =)

    Yours most humbly,
    Sean S. (Phrosztbyte)

  2. #2
    Join Date
    Mar 2010
    Location
    Austin - Texas
    Posts
    10,140
    Blog Entries
    48

    Smile Re: How to query the number of available packages

    Quote Originally Posted by Phrosztbyte View Post
    Greetings!

    I've been using Linux for 14 years, mostly Fedora, Gentoo, FreeBSD and Linux Mint, but just decided to switch to openSUSE, as it seems the only logical thing to do, having found out, after long hours of research on Distrowatch and the Web in general, that it's the best distro in existence =) So I installed the KDE desktop version of openSUSE 11.2 (19 days before 11.3 I know right? ) and am *loving* it even more than I thought I would. The ONLY problem I'm having so far is that I have as yet been unable to find any way to query YaST/Zypper to find out how many packages are available (both installed and not installed) in the various repositories.

    This may seem a curious request, as the exact number of packages is likely unimportant to most users, however I'd like to know how many there are, for statistical analysis and just out of curiosity. So is there a command or a script/application I can use to find this out? For instance, in Debian-based distros it's a fairly simple affair: just use `aptitude` and at the bottom of the nostalgia-inducing text-mode GUI it states "There are x packages available".

    I'd sincerely appreciate any assistance in this tiny matter, and patiently await the reply from any of you. Thank you very much in advance, and I look forward to being a productive and, hopefully, helpful member of the openSUSE community! =)

    Yours most humbly,
    Sean S. (Phrosztbyte)
    So we are using openSUSE 12.2 these days with 12.3 to come out shortly. Consider doing an upgrade to the latest versions you can find here: software.opensuse.org: Download openSUSE 12.2

    1. List All Repositories from Terminal to Find Repo Name Used:

    Code:
    zypper repos
    2. List All Files in Repository called Packman:

    Code:
    zypper se -r Packman
    or to scroll through the large list of names.

    Code:
    zypper se -r Packman | less
    3. List all installed Applications in Alpha Order with less viewer:

    Code:
    rpm -q --all | sort | less
    Thank You,
    My Blog: https://forums.opensuse.org/blogs/jdmcdaniel3/

    Software efficiency halves every 18 months, thus compensating for Moore's Law

    Its James again from Austin, Texas

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

    Default Re: How to query the number of available packages

    On Sat, 23 Feb 2013 01:26:01 +0000, Phrosztbyte wrote:

    > This may seem a curious request, as the exact number of packages is
    > likely unimportant to most users, however I'd like to know how many
    > there are, for statistical analysis and just out of curiosity. So is
    > there a command or a script/application I can use to find this out? For
    > instance, in Debian-based distros it's a fairly simple affair: just use
    > `aptitude` and at the bottom of the nostalgia-inducing text-mode GUI it
    > states "There are x packages available".


    The question that needs to be answered is "from where" - there are
    hundreds (if not thousands) of repositories on the build service.

    For the standard repos on your system, you could do:

    sudo zypper ref; zypper se | wc -l

    And that'll give you a pretty close number (there will be a few standard
    header lines that you can subtract, but you'll be within no more than
    half a dozen packages). Depending on the repos configured, you may see
    some duplicates as well.

    To find for a specific repository, you can limit the search to a
    repository. Get the repo numbers:

    zypper lr

    And then add "-r [n]" as a parameter to the 'zypper se' command and
    that'll limit the search (what 'se' means) to the specified repository
    configured on the system.

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

  4. #4
    Join Date
    May 2010
    Location
    Space Colony Lagrange Point 22° à, 77° Ƅ, 56° ɤ, 99° ɜ
    Posts
    3,166

    Default Re: How to query the number of available packages

    Quote Originally Posted by Phrosztbyte View Post
    Greetings!

    I've been using Linux for 14 years, mostly Fedora, Gentoo, FreeBSD and Linux Mint, but just decided to switch to openSUSE, as it seems the only logical thing to do, having found out, after long hours of research on Distrowatch and the Web in general, that it's the best distro in existence =) So I installed the KDE desktop version of openSUSE 11.2 (19 days before 11.3 I know right? ) and am *loving* it even more than I thought I would. The ONLY problem I'm having so far is that I have as yet been unable to find any way to query YaST/Zypper to find out how many packages are available (both installed and not installed) in the various repositories.

    This may seem a curious request, as the exact number of packages is likely unimportant to most users, however I'd like to know how many there are, for statistical analysis and just out of curiosity. So is there a command or a script/application I can use to find this out? For instance, in Debian-based distros it's a fairly simple affair: just use `aptitude` and at the bottom of the nostalgia-inducing text-mode GUI it states "There are x packages available".

    I'd sincerely appreciate any assistance in this tiny matter, and patiently await the reply from any of you. Thank you very much in advance, and I look forward to being a productive and, hopefully, helpful member of the openSUSE community! =)

    Yours most humbly,
    Sean S. (Phrosztbyte)
    This question would have been a no brainer if we opened gtk version of YAST
    GNOME Version 3.20.2
    openSUSE Leap 42.3 64-bit

    www.vazhavandan.blogspot.com

  5. #5
    Join Date
    Feb 2013
    Location
    Los Angeles, California, USA
    Posts
    3

    Talking Re: How to query the number of available packages

    Yikes! I'm sorry about the version miscommunication (11.2 instead of the correct 12.2 ) and I thank you ALL for the great support and quick replies! From experience with certain other distros' communities I was expecting a sparsely-worded, perhaps cryptic rejoinder as late as tomorrow afternoon admonishing me for being unable to figure the problem out myself. I can see I was very correct indeed to choose openSUSE! You guys *rock*, and I truly appreciate your kind and wisely-written aid.

    As for which repo(s) I was referring to, I meant the "main" or most-commonly used official openSUSE repos, but I can figure it out myself now, thanks (again) to all of you. I wasn't aware there were very many repositories, and by you asking me which I meant I can see there is a large number of them. This is a GOOD thing! =) I hope very much one day to repay the favor and give back to this community that has, in the first 24 hours of my joining, helped me already! You guys have a great night (or day, depending where you are), and thanks again!

    Gratefully,
    Sean

  6. #6
    Join Date
    Feb 2013
    Location
    Los Angeles, California, USA
    Posts
    3

    Cool Re: How to query the number of available packages

    HAHA yes indeed! I'm not that familiar with GTK+ but I think I'll probably install the GTK version (if that's possible). Thanks vazhavandan! That's *exactly* what I was looking for =) I am SO excited to start learning more about openSUSE! It seems to be the best distro I've ever had the pleasure of using, and the openSUSE online community has already greatly contributed to my opinion of it! xD I just noticed the sig about Moore's law above, too btw! I *love* it haha! Makes perfect sense--they should teach that as a corollary in all computer science intro courses =)

  7. #7
    Join Date
    May 2010
    Location
    Space Colony Lagrange Point 22° à, 77° Ƅ, 56° ɤ, 99° ɜ
    Posts
    3,166

    Default Re: How to query the number of available packages

    Quote Originally Posted by Phrosztbyte View Post
    HAHA yes indeed! I'm not that familiar with GTK+ but I think I'll probably install the GTK version (if that's possible). Thanks vazhavandan! That's *exactly* what I was looking for =) I am SO excited to start learning more about openSUSE! It seems to be the best distro I've ever had the pleasure of using, and the openSUSE online community has already greatly contributed to my opinion of it! xD I just noticed the sig about Moore's law above, too btw! I *love* it haha! Makes perfect sense--they should teach that as a corollary in all computer science intro courses =)
    If you are using kde(i use gnome,hence gtk+ lib based YaST) better stick with qt version of YaST . gtk version is quite heavily buggy,but i don't want to switch to qt version as i find it too complicated for my use. It confuses the hell out of me :-( I am pretty sure that there should be a way of finding count in qt version.

    Also gtk apps generally will have theme related issues in KDE. if you really want to switch . you need to do the reverse of what is described here
    https://forums.opensuse.org/english/get-technical-help-here/applications/389300-changing-yast-use-qt.html

    Also :- very warm welcome to you at openSUSE.

    Do read https://forums.opensuse.org/faq.php
    and also this https://forums.opensuse.org/content/...rum-usage.html (learn to subscribe to rss feeds here)
    Yikes! I'm sorry about the version miscommunication (11.2 instead of the correct 12.2 ) and I thank you ALL for the great support and quick replies! From experience with certain other distros' communities I was expecting a sparsely-worded, perhaps cryptic rejoinder as late as tomorrow afternoon admonishing me for being unable to figure the problem out myself.
    if you are really lucky you can those replies here too.
    GNOME Version 3.20.2
    openSUSE Leap 42.3 64-bit

    www.vazhavandan.blogspot.com

  8. #8
    dd NNTP User

    Default Re: How to query the number of available packages

    On 02/23/2013 05:26 AM, Phrosztbyte wrote:
    > As for which repo(s) I was referring to, I meant the "main" or
    > most-commonly used official openSUSE repos,


    for the 'average', new openSUSE user the most commonly used official
    repos are the five listed in the paragraph beginning with "IMPORTANT"
    in this posting: http://tinyurl.com/33qc9vu

    they are: OSS, Non-OSS, Non-OSS-Update, Update, and Packman

    but i'll admit i don't know what an 'average' user is and also can't
    define 'new' as in "new openSUSE user"..

    and: Packman is not an 'official' repo because it is _not_ an
    openSUSE repo, but just about everyone uses it..

    --
    dd

  9. #9
    Join Date
    Sep 2012
    Location
    Germany
    Posts
    254

    Default AW: How to query the number of available packages

    It is quite easy to query the number of total and installed packages. Even single repos can be queried by that. The magic command is 'wc -l'.

    Total number of available packages from all enabled repos (with my results):
    Code:
    zypper se -s | wc -l
    36051
    Total number of installed packages:
    Code:
    zypper se -si | wc -l
    2133
    To query specific repos have a look at the output from 'zypper lr':

    Code:
    zypper lr
    #  | Alias                     | Name                               | Enabled | Refresh
    ---+---------------------------+------------------------------------+---------+--------
     1 | KDE-Extra                 | KDE-Extra                          | Yes     | Yes    
     2 | libdvdcss                 | libdvdcss                          | Yes     | Yes    
     3 | local                     | local                              | Yes     | Yes    
     4 | packman                   | packman                            | Yes     | Yes    
     5 | repo-debug                | openSUSE-12.2-Debug                | No      | Yes    
     6 | repo-debug-update         | openSUSE-12.2-Update-Debug         | No      | Yes    
     7 | repo-debug-update-non-oss | openSUSE-12.2-Update-Debug-Non-Oss | No      | Yes    
     8 | repo-non-oss              | openSUSE-12.2-Non-Oss              | Yes     | Yes    
     9 | repo-oss                  | openSUSE-12.2-Oss                  | Yes     | Yes    
    10 | repo-source               | openSUSE-12.2-Source               | No      | Yes    
    11 | repo-update               | openSUSE-12.2-Update               | Yes     | Yes    
    12 | repo-update-non-oss       | openSUSE-12.2-Update-Non-Oss       | Yes     | Yes
    To get the number of packages from a specific repo just add the number or alias from it to the command:
    Code:
    zypper se -s -r 4 | wc -l       ## available packages from repo 4 (packman)
    5525
    Code:
    zypper se -si -r packman | wc -l       ## installed (-si) packages from repo 4 (packman)
    140
    zypp it...

Tags for this Thread

Posting Permissions

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