The fastest way to check if a Conan package exists

The conan search command is the direct way to check whether a package is available in your Conan repository. Open your terminal or command prompt, type conan search package_name, and Conan will tell you whether that package exists and which versions are stored.

If the package exists, you'll see a list of available versions. If it doesn't, Conan returns no results. This works for packages in your local cache and in any remote repository you've configured — by default, that's the Conan Center Repository, which holds thousands of open-source packages.

You can also search with a wildcard pattern. For example, conan search "boost*" will show you every package name that starts with "boost". This is useful when you're not sure of the exact spelling or want to see what versions of a package family are available.

Key Takeaways

  • Use conan search package_name in your terminal to check if a package exists in your local cache or configured remotes.
  • The search command returns version numbers and package details if the package is found, and shows nothing if it isn't.
  • Wildcard searches like conan search "boost*" let you find packages when you're unsure of the exact name.
  • You can search specific remotes by adding -r remote_name to limit results to one repository instead of all configured ones.
  • The Conan Center Repository is the default remote, but you can add custom remotes and search those as well.

Searching your local cache versus remote repositories

When you run conan search without specifying a remote, Conan checks both your local cache (packages already downloaded to your machine) and all configured remote repositories. Your local cache is faster to search because the data is already on your computer.

If you want to search only your local cache, use conan search package_name --cache. This is useful when you're offline or want to see what you've already downloaded. To search only a specific remote repository, use conan search package_name -r remote_name — replace remote_name with the actual name of the remote, such as conancenter for the Conan Center Repository.

Searching a remote takes longer because Conan has to contact the server, but it shows you packages that aren't in your local cache yet. This is how you discover new packages or check whether a newer version exists before you download it.

Understanding the search results

When a package is found, Conan displays the package name, available versions, and sometimes additional metadata. The output looks like this: the package identifier at the top, followed by a list of versions with their revision hashes. Each version may have multiple revisions if the package was updated.

The revision hash (a long string of characters) identifies a specific build of that version. Most of the time you only need the version number — for example, 1.2.3 — but Conan tracks revisions so you can pin an exact build if you need reproducibility. If you see only one revision listed, that's the current build of that version.

If the search returns nothing, the package does not exist in the repositories you searched. This could mean the package name is spelled differently, it's not in the remote you checked, or it hasn't been published to Conan yet.

Checking package details before you use it

Once you know a package exists, you can inspect it more closely with conan info package_name/version@. This command shows you the package's dependencies, settings, and options — useful information before you add it to your project.

You can also visit the Conan Center Repository website directly at conan.io/center to browse packages, read descriptions, and see which versions are available. The website shows the same packages as the conan search command but with human-readable documentation and links to the source code.

Before using a package in your project, check whether it supports your target platform (Windows, Linux, macOS) and your compiler version. Some packages are limited to specific operating systems or require a minimum compiler version. The conan info command and the Conan Center website both show these constraints.

Searching when you're not sure of the exact name

Package names in Conan follow conventions but aren't always obvious. If you're looking for a library but don't know its exact Conan package name, start with a partial search. For example, if you want JSON support, try conan search "json*" to see all packages with "json" in the name.

Common naming patterns help too: many packages use their original library name (like boost, openssl, zlib), while others use a shortened or stylized version. If a wildcard search doesn't find what you're looking for, check the Conan Center website or search GitHub for the library name plus "conan" to find the correct package identifier.

You can also search by description or purpose on the Conan Center website, which is faster than guessing package names. The website has categories and tags that help you browse by use case — for example, "compression" or "cryptography" — rather than trying to remember exact names.

Adding a custom remote and searching it

If your organization hosts its own Conan packages in a private repository, you'll need to add that remote before you can search it. Use conan remote add remote_name repository_url to register the remote, then search it with conan search package_name -r remote_name.

You can list all configured remotes with conan remote list. This shows you the name and URL of every repository Conan knows about. If you need to remove a remote, use conan remote remove remote_name. The order of remotes matters — Conan searches them in the order they're listed, so if two remotes have the same package, the first one in the list is used.

Private remotes often require authentication. If you're prompted for a username and password when searching a custom remote, ask your team lead or repository administrator for credentials. Once you log in once, Conan stores your credentials locally so you don't have to enter them every time.

Troubleshooting when search returns no results

If conan search finds nothing, start by checking your spelling. Conan package names are case-sensitive and must match exactly. Try searching with a wildcard to see if the package exists under a slightly different name.

Next, verify that your remotes are configured and reachable. Run conan remote list to see which repositories you're searching. If you expect a package to be in a remote but it's not showing up, the remote might be offline, or the package might not have been published to that repository yet. Try conan remote update to refresh the package list from all remotes.

If you're searching a private remote and still see nothing, make sure you're logged in. Some private repositories require authentication before they'll show you their package list. Check with your team to confirm the package has been published and that your account has permission to see it.

Frequently Asked Questions

Can I search for packages by description instead of name?

The conan search command only searches by package name and version. To find packages by what they do, use the Conan Center website at conan.io/center, which has categories, tags, and descriptions. You can browse by purpose — for example, "HTTP client" or "image processing" — rather than guessing package names.

What's the difference between conan search and conan info?

conan search tells you whether a package exists and lists available versions. conan info shows you detailed information about a specific version: its dependencies, settings, options, and platform support. Use search to find packages, then use info to inspect the one you want to use.

Do I need to be online to search my local cache?

Yes, but only to search remotes. If you use conan search package_name --cache, Conan searches only packages already on your machine and doesn't need internet. To search remote repositories, you need an active connection.

Can I search multiple remotes at once?

By default, conan search searches all configured remotes plus your local cache. If you want to search only one specific remote, use conan search package_name -r remote_name. To search all remotes, just run the command without the -r flag.

What if a package exists but I can't download it?

A package might exist in a remote but still fail to download if your account lacks permission, the remote requires authentication you haven't provided, or the package was removed after being indexed. Try logging in to the remote with conan remote login remote_name username, then attempt the download again. If it still fails, contact your repository administrator.