Error: requested datatype primary not available

Clean the cache

For starters I would clean up my cache area.

$ sudo yum clean all

Testing each repo

If that doesn't resolve the issue then I would go through and attempt to disable each repository 1 at a time and then re-run the yum list command to see if that resolves your issue.

You can do this via the command line temporarily, but first you need to get the actual names of the repositories, the names of the files are not necessarily the same thing.

Here I'm using Fedora 19, for example:

$ yum repolist | expand
Loaded plugins: auto-update-debuginfo, changelog, langpacks, refresh-packagekit
repo id                                       repo name                   status
fedora/19/x86_64                              Fedora 19 - x86_64          36,253
fedora-debuginfo/19/x86_64                    Fedora 19 - x86_64 - Debug   6,635
google-chrome                                 google-chrome                    3
rpm-sphere                                    RPM Sphere                   7,679
rpmfusion-free/19/x86_64                      RPM Fusion for Fedora 19 -     462
rpmfusion-free-debuginfo/19/x86_64            RPM Fusion for Fedora 19 -     157
rpmfusion-free-updates/19/x86_64              RPM Fusion for Fedora 19 -     414
rpmfusion-free-updates-debuginfo/19/x86_64    RPM Fusion for Fedora 19 -     149
rpmfusion-nonfree/19/x86_64                   RPM Fusion for Fedora 19 -     219
rpmfusion-nonfree-debuginfo/19/x86_64         RPM Fusion for Fedora 19 -      62
rpmfusion-nonfree-updates/19/x86_64           RPM Fusion for Fedora 19 -     497
rpmfusion-nonfree-updates-debuginfo/19/x86_64 RPM Fusion for Fedora 19 -     170
*updates/19/x86_64                            Fedora 19 - x86_64 - Update 17,597
*updates-debuginfo/19/x86_64                  Fedora 19 - x86_64 - Update  2,241
virtualbox/19/x86_64                          Fedora 19 - x86_64 - Virtua     10
repolist: 72,548

Enabling one repo at a time

So I can see the names of my repos in the very first column. Next you'll want to do `yum list where you disable everything and then enable just one repo, to confirm that it's working right.

$ yum --disablerepo=* --enablerepo=google-chrome list available
Loaded plugins: auto-update-debuginfo, changelog, langpacks, refresh-packagekit
Available Packages
google-chrome-beta.x86_64                                                                               33.0.1750.91-1            

When you get to the repo that's causing an issue you should get that same error you mentioned in your post.


I was experiencing the same Error: requested datatype filelists not available issue. I followed @slm process above to narrow down which .repo file was causing the issue, but now which individual repo?

I turned enable=1 on all individual repos within the .repo file to 0 and then tested the list command after enabling each individual repo. Eventually I found the individual repo causing the issue.

We host repository cache with Artifactory... but even with externally hosted repos, if you can browse the repos (like http://mirror.centos.org/centos/7.5.1804/os/x86_64/repodata/) you'll see the filelist.xml.gz, this is the missing file the error is talking about.

For Artifactory, I found: https://www.jfrog.com/confluence/display/RTF/RPM+Repositories

Indexing the File List 
The filelists.xml metadata file of an RPM repository contains a list of all
the files in each package hosted in the repository. When the repository
contains many packages, reindexing this file as a result of interactions
with the YUM client can be resource intensive causing a degradation of
performance. Therefore, from version 5.4, reindexing this file is initially
disabled when an RPM repository is created. To enable indexing
filelists.xml, set the Enable File List Indexing checkbox.

So I was able to navigate to the Admin -> local -> "repo" and check the box to create the filelist.

After this, I cleaned cache:

$ yum clean all

$ rm -rf /var/cache/yum

and reran

$ yum list iostat

and it resolved my issue.