How to Install RetroArch on Ubuntu Linux

RetroArch is an open-source front-end that unifies multiple emulators, game engines, and media players into a single interface. For instance, whether you want to play classic console games from NES and SNES, arcade titles via MAME, or PlayStation-era favorites, RetroArch provides a consistent experience with advanced features like shader support, netplay for online multiplayer, save states, and rewinding. By the end of this guide, you will have RetroArch installed and ready to download emulator cores directly from the application.

Choose Your RetroArch Installation Method

Generally, Ubuntu provides multiple ways to install RetroArch, each with different trade-offs for version freshness and update mechanisms.

MethodChannelVersionUpdatesBest For
Libretro PPALaunchpadStable (1.21.x)Via apt upgradeAPT integration with system packages
SnapSnapcraftLatest (1.22.x)AutomaticUsers who prefer sandboxed apps
FlatpakFlathubLatest (1.22.x)Via flatpak updateUsers who prefer Flatpak ecosystem

Therefore, for most users, the Libretro PPA method is recommended because it integrates with your system package manager and provides the latest stable release with security updates through standard apt commands.

This guide supports Ubuntu 22.04 LTS and 24.04 LTS installations. The Libretro PPA provides packages for both supported LTS releases, while Snap and Flatpak remain compatible across all Ubuntu versions. Commands shown work identically on both supported LTS releases.

Method 1: Install RetroArch on Ubuntu via APT

Update Ubuntu Before RetroArch Installation

Before diving into the installation process, ensuring that your Ubuntu system is up-to-date is crucial. Consequently, this will help prevent potential issues during the installation and ensure your system runs smoothly. To update your Ubuntu system, open your terminal and enter the following command:

sudo apt update && sudo apt upgrade

Import RetroArch Launchpad PPA

Currently, the recommended method for installing RetroArch is importing the Launchpad PPA maintained by the Libretro team. This provides the latest stable release with features and improvements not yet available in the default Ubuntu repositories.

First, ensure that the required dependency for managing PPAs is installed:

sudo apt install software-properties-common -y

Subsequently, you can import the stable or testing PPAs. If you import both, the repository with the newest version will be chosen automatically, which will most likely be the development build.

Import RetroArch Stable PPA (Recommended):

sudo add-apt-repository ppa:libretro/stable -y

Import RetroArch Testing PPA:

sudo add-apt-repository ppa:libretro/testing -y

Refresh APT Index After RetroArch PPA Import

Therefore, now that you’ve imported the desired PPA, it’s time to update the package list to reflect the changes. Run the following command in your terminal:

sudo apt update

Install RetroArch via APT Install Command

With the packages list updated, you’re now ready to install RetroArch. Enter the following command in your terminal to start the installation process:

sudo apt install retroarch -y

After installation completes, verify RetroArch is installed correctly by checking the version:

retroarch --version

Expected output showing RetroArch is accessible:

RetroArch - Frontend for libretro
Version: 1.x.x

The version number depends on your PPA (stable vs testing) and when you install. The PPA stable branch typically provides version 1.21.x, while Snap and Flatpak often have newer releases like 1.22.x.

Method 2: Install RetroArch via Snap

Alternatively, Snap packages provide automatic background updates and run in a sandboxed environment. Ubuntu includes Snap by default, so you can install RetroArch immediately without additional setup.

Install RetroArch from the Snap Store:

sudo snap install retroarch

Verify the installation by checking the installed Snap packages:

snap list retroarch

Expected output confirming the installation:

Name       Version  Rev    Tracking       Publisher   Notes
retroarch  1.x.x    xxxx   latest/stable  libretro    -

Moreover, Snap handles updates automatically in the background, keeping RetroArch current without manual intervention. The sandboxed environment isolates RetroArch from your system, providing additional security for downloaded cores and ROMs.

Method 3: Install RetroArch with Flatpak and Flathub

On the other hand, Flatpak provides sandboxed applications that run consistently across Linux distributions. This method is ideal if you prefer the Flatpak ecosystem or want the latest version with distribution-independent packaging.

Importantly, Flatpak is not pre-installed on Ubuntu. If you have not set it up yet, follow our Flatpak installation guide for Ubuntu to install Flatpak and configure the Flathub repository before continuing.

Enable Flathub Repository

Before installing RetroArch through Flatpak, enable the Flathub repository, which is the primary source for Flatpak applications:

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

Install RetroArch via Flatpak Command

Subsequently, with Flathub enabled, install RetroArch using the following command:

sudo flatpak install flathub org.libretro.RetroArch -y

Verify the Flatpak installation:

flatpak info org.libretro.RetroArch

Expected output showing installation details:

RetroArch - Frontend for libretro

          ID: org.libretro.RetroArch
         Ref: app/org.libretro.RetroArch/x86_64/stable
     Version: 1.x.x
      Origin: flathub
Installation: system

Launch RetroArch

Once installation is complete, you can launch RetroArch from the terminal or the applications menu.

Launch RetroArch from Terminal

If you installed RetroArch via APT or Snap, launch it with:

retroarch

Conversely, for Flatpak installations, use:

flatpak run org.libretro.RetroArch

Launch RetroArch from Applications Menu

Alternatively, desktop users can launch RetroArch from the graphical interface by navigating to Activities > Show Applications > RetroArch.

Managing RetroArch

Specifically, this section covers updating and removing RetroArch based on your installation method.

Update RetroArch

APT Update Method

Update RetroArch alongside your other system packages:

sudo apt update && sudo apt upgrade

Snap Update Method

Typically, Snap packages update automatically in the background. To manually trigger an update:

sudo snap refresh retroarch

Flatpak Update Method

Update all Flatpak applications, including RetroArch:

sudo flatpak update

Remove RetroArch

Follow the steps for your installation method to remove RetroArch from your system.

APT Removal Method

Remove the RetroArch package and clean up orphaned dependencies:

sudo apt remove retroarch && sudo apt autoremove

Additionally, if you do not plan to reinstall RetroArch, also remove the PPA to prevent unnecessary repository updates. For more details on PPA management, see our guide on removing PPAs from Ubuntu.

Remove RetroArch Stable PPA:

sudo add-apt-repository --remove ppa:libretro/stable -y

Remove RetroArch Testing PPA:

sudo add-apt-repository --remove ppa:libretro/testing -y

Snap Removal Method

Remove the RetroArch Snap package:

sudo snap remove retroarch

Flatpak Removal Method

Remove RetroArch installed via Flatpak:

sudo flatpak uninstall org.libretro.RetroArch

Remove RetroArch User Data

However, after removing RetroArch, configuration files, save states, and downloaded assets remain in your home directory. To completely remove all RetroArch data:

Warning: The following commands permanently delete your RetroArch configuration, save states, screenshots, and downloaded cores. If you have game saves or custom configurations you want to keep, back them up first.

APT/Snap installations:

rm -rf ~/.config/retroarch ~/.local/share/retroarch

Flatpak installations:

rm -rf ~/.var/app/org.libretro.RetroArch

Troubleshooting RetroArch

Specifically, this section will discuss common troubleshooting issues you might encounter while using RetroArch Emulator with either Flatpak or PPA installations on Ubuntu.

Missing or Unwritable Assets Directory (PPA Installation)

For example, if RetroArch displays incorrect fonts, broken icons, or a blank interface after PPA installation, the assets directory is likely missing or pointing to an unwritable location. Check the current assets directory configuration:

grep assets_directory ~/.config/retroarch/retroarch.cfg

However, if the output shows a system path like /usr/share/retroarch/assets, you need to redirect it to your user directory. Edit the configuration file:

sed -i 's|assets_directory = .*|assets_directory = "~/.config/retroarch/assets"|' ~/.config/retroarch/retroarch.cfg

Then, create the directory and download assets through RetroArch:

mkdir -p ~/.config/retroarch/assets

Next, open RetroArch and navigate to Main Menu > Online Updater > Update Assets to download the newest set of assets. After the download completes, restart RetroArch to see the correct fonts and icons.

Audio Issues

Additionally, if you experience audio stuttering, crackling, or desync while using RetroArch, try adjusting the audio latency settings. Open RetroArch and navigate to Settings > Audio > Output and try different audio drivers. On Ubuntu, pulse (PulseAudio) or pipewire typically work best. You can also increase the audio latency in Settings > Audio > Latency to reduce stuttering at the cost of slightly delayed sound.

Incompatible or Missing Cores

Similarly, if certain games fail to run or show “No core available” errors, the required emulator core may be missing or outdated. Open RetroArch and navigate to Main Menu > Online Updater > Core Updater to browse and download cores. Each gaming system requires its specific core—for example, Nestopia or FCEUmm for NES games, Snes9x for SNES, or PCSX ReARMed for PlayStation. After downloading a core, load your game through Main Menu > Load Content and RetroArch will prompt you to select the appropriate core.

Conclusion

In conclusion, you now have RetroArch installed on Ubuntu using APT with the Libretro PPA, Snap, or Flatpak. Furthermore, with RetroArch configured, you can download emulator cores directly from the application and start playing classic games from NES, SNES, PlayStation, and dozens of other systems. Experiment with shaders for visual enhancements, configure netplay for online multiplayer, and keep your cores updated through the Online Updater for the best compatibility. For modern gaming on Ubuntu, see our guides on installing Steam on Ubuntu or setting up Wine for Windows games.

Leave a Comment