If you look in the ".conan" directory directly under one of your local Conan repositories, for instance, "conan-local/.conan", you will find a "packages.ref.json" file. But, what exactly is this file?
The "packages.ref.json" is a Conan repository file that serves as an index to the Conan repository itself and lists all indexed packages that reside in the repository. Consequently, if you encounter issues with the Conan search, you will need to examine this file.
How is the "packages.ref.json" file created?
By default, the "packages.ref.json" file is created and deployed by the “_system_” user (see All about the "_system_" user for more) as part of the index calculation performed regularly in Conan repositories.
Note:
If you perform a search on a local Conan repository and the "packages.ref.json" file does not exist, Artifactory will regenerate a new "packages.ref.json" file that will be found directly under the ".conan" directory.
What happens when the "packages.ref.json" file is missing?
In case you have deleted the "packages.ref.json" file by a fault or noticed that the index is missing in your repository, the calculation of the index file will be triggered automatically the next time you run a Conan search against the Artifactory Conan repository using your local client by a user who has no restricted access over the repository, and that will generate the missing "packages.ref.json" file for the repository.
How to recalculate the "packages.ref.json" file?
The recalculation of the "packages.ref.json" can be triggered by using the Calculate Conan Repository Metadata REST API endpoint, which is only supported for local Conan repositories:
curl -XPOST https://JFROG_URL/artifactory/api/conan/conan-local/reindex
As stated in our REST API documentation, the calculation can be synchronous (the default) or asynchronous.