Ian Tait
Ian Tait

Reputation: 607

Why does 'yum --disablerepo=\* list' still list items?

I am trying to set up a custom yum repo using Nexus. In order to test this, I am trying to list all of the items only in that repo, and not in any other repo that is set up on my machine. I am using RHEL 6.6.

The problem is, when i run yum --disablerepo=\* list, there are still hundreds of items that show up, and in the last column, the repos listed begin with an '@' symbol. How do I use this yum command to show literally nothing when I run list?

The reason I want to do this, is so that when I run yum --disablerepo=\* list --enablerepo=<my_custom_repo> it will show ONLY items from my repository, and nothing else at all.

Is this possible?

Upvotes: 2

Views: 3561

Answers (1)

Etan Reisner
Etan Reisner

Reputation: 80931

By default yum list lists available and installed packages.

The packages you are seeing are the installed packages.

The @ is the name of the repo they came from when they were installed (CentOS 5 didn't record that information and just said installed there).

To avoid listing them you want to use yum list available to only list available packages.

yum --disablerepo=* list available

and

yum --disablerepo=* --enablerepo=custom-repo list available

(And yes, not escaping that asterisk is probably safe. You aren't likely to have files named --disablerepo=<something> in your current directory.)

Upvotes: 4

Related Questions