Fixing Flatpak Error: No remote refs found similar to ‘flathub’

No remote ref found similar to xyz is a common issue with Flatpak. Here's why you see this error and the steps you can take to fix this issue.
Warp Terminal

So, I just installed Fedora. Installing my favorite applications was on the list of things to do after installing Fedora.

I tried installing VLC in Flatpak form, but it gave me an error:

error: No remote refs found similar to ‘flathub’

flatpak remote ref not found error
No remote refs found error displayed with Flatpak

Fixing “no remote refs found similar to flathub” error

The fix is rather simple. Add the Flathub repository in the following way:

flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

It will ask for your password, or you could use the above command with sudo.

Now, if you try to install a Fltapak package from Fltahub, it should work as expected.

flatpak no remote ref problem fixed
Adding the Flathub repoistory fixes the issue

Reason why you see this error and how it was fixed

Now that you have fixed the error, it would be a good idea also to learn why you saw this error in the first place and how it was fixed.

Like most other package managers in Linux, Flatpak also works on the concept of repositories. In simpler words, you can imagine package repositories as a warehouse where packages are stored.

But to retrieve a package from this warehouse, you need to know the warehouse's address first.

That’s what happens here. You are trying to download (and install) a package from a certain repository (Flathub in this case). But your system doesn’t know about this “flathub”.

In order to solve this issue, you added the Flathub repository. When you do that, your Linux system can look for the package you are trying to install in this repository.

You may see all the remote Flatpak repositories added to your system.

flatpak list repositories
List Flatpak repositories added to your system

Let’s have a deeper look at the command which was used for adding the repository:

flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
  • flatpak: this is the flatpak CLI tool.
  • remote-add: this option indicates that you are adding a new remote repository.
  • –if-not-exists: this ensures that the remote repository is only added if not already added.
  • flathub: this is a short reference for the actual repository's complete URL. You may name it something else but the convention is to use the one provided by the developer.
  • https://flathub.org/repo/flathub.flatpakrepo: The actual repository address.

The bottom line is that when you see Flatpak complaining about ‘no remote refs found similar to xyz’, verify that the said repository is not added and if that’s the case, figure out its URL and add it to the system.

I hope this quick tip helps you with this Flatpak issue.

About the author
Abhishek Prakash

Abhishek Prakash

Created It's FOSS 11 years ago to share my Linux adventures. Have a Master's degree in Engineering and years of IT industry experience. Huge fan of Agatha Christie detective mysteries 🕵️‍♂️

Become a Better Linux User

With the FOSS Weekly Newsletter, you learn useful Linux tips, discover applications, explore new distros and stay updated with the latest from Linux world

It's FOSS

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to It's FOSS.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.