Flatpak comes pre-installed in openSUSE Leap 15.2. However, executing the flatpak command for the first time had a minor quirk in a freshly installed Leap 15.2 machine.
error: While opening repository /var/lib/flatpak/repo: opendir(objects): No such file or directoryI see other users commenting about this on Reddit. So, for now, just remove the repo file.
sudo rmdir /var/lib/flatpak/repoThen, add the Flathub repository as its documentation describes.
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepoVoilà! Now, you may search apps and install them with the flatpak command. For example, if you would search for Visual Studio Code, you would do:
flatpak search codeFind its Application Id from the result obtained with the above command and install it as follows:
flatpak install flathub com.visualstudio.codeThe installation command arguments format is:
flatpak install repo_name application_idIn order to remove an application that you previously installed through Flatpak, just replace install by remove followed by the Application Id and it's done.

