listing packages with yum or apt-get

Discussion in 'Command Line' started by animaguy, Aug 7, 2012.

  1. animaguy

    animaguy New Member

    Messages:
    53
    Likes Received:
    1
    Trophy Points:
    0
    does anyone know the commands to list packages on yum or apt-get.

    i know yum grouplist on CentOS and like it cause I like to remove group packages that I do not use.

    I use the | tee to list the output on a .txt file to study the groups.

    But I can't find any commands to list single installed packages on CentOS.


    I also use Linux Mint and would like to know of any similiar commands that list either group or single packages and | tee the output to a .txt file if this is possible.

    I like to take notes like this as I learn to customize and experiment with different packages.

    And if anyone knows how to list repositories, that would be great if you could share that as well.

    any help would be much appreciated.

    Thanks
  2. pane-free

    pane-free Active Member

    Messages:
    346
    Likes Received:
    78
    Trophy Points:
    28
    search engines are friends of yours -- use them (we all had to)

    Also, see Fred's and others' How2's here, below.
  3. animaguy

    animaguy New Member

    Messages:
    53
    Likes Received:
    1
    Trophy Points:
    0
    thanks, fair advice.

    i found

    yum list all | tee boot.txt

    which was what i was looking for in rpm

    still looking for the apt-get equivalent
  4. pane-free

    pane-free Active Member

    Messages:
    346
    Likes Received:
    78
    Trophy Points:
    28
    OP said, " . . . commands to list single installed packages on CentOS."
    -----------------------------------------------------------------------------------------

    Download and install the rpm forge release, which will enable YUM to access:

    wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
    rpm -i rpmforge-release-0.3.6-1.el5.rf.i386.rpm

    After this is installed (it takes a long time), you can install APT.

    You should now be able to use apt-get and install the apt repositories.
    You will have to add your sources at /etc/apt/sources.list.d or to /etc/apt/sources.list

    SOURCE: http://support.rightscale.com/06-FAQs/FAQ_0063_-_How_can_I_use_apt-get_on_CentOS_based_images?
    ------------------------------------------------------------------------------------------
    (italics mine)
  5. animaguy

    animaguy New Member

    Messages:
    53
    Likes Received:
    1
    Trophy Points:
    0
    thanks pane-free I am a little side tracked right now with learning network config issues but this thread is a great reference as I learn the overall structure of linux.

    i am focused on learning both yum and apt-get

    thanks again
  6. KenJackson

    KenJackson Active Member

    Messages:
    129
    Likes Received:
    28
    Trophy Points:
    28
    On Fedora (probably works on CentOS too) I routinely use yum search to find a package to install. For example, this command lists lots and lots of editors and editor helper packages:
    Code:
    yum search editor
    If I want to see information about a package before I install it, I do this:
    Code:
    yum info joe
    And to install (if you don't have sudo setup, then use su first):
    Code:
    sudo yum install joe
    Once it's installed, I can see all about it and what files it includes with the rpm command:
    Code:
    rpm -qil joe
    But if I want to peek inside the package without installing it, I use the little-know repoquery command:
    Code:
    repoquery -il joe | less
    Yeah, but that's not helpful. He asked for help.

Share This Page