Fedora makes a strong workstation for statistics, reporting, and reproducible data analysis because the main R stack is available through DNF. To install R on Fedora with RStudio Desktop, use Fedora’s packaged R runtime first, then choose either Posit’s official RPM or the community iucar COPR package for the IDE.
The commands target Fedora 44 and Fedora 43 with DNF5. R comes from Fedora’s repositories; RStudio Desktop is separate because Fedora’s official repositories only package helper libraries such as R-rstudioapi, not the desktop IDE.
Install R and RStudio on Fedora
Start by choosing how you want RStudio updates to work. R itself should normally come from Fedora’s repositories, while RStudio Desktop can come from either Posit’s direct RPM download or the community-maintained iucar COPR repository.
| Component | Source | Package or Asset | Update Behavior |
|---|---|---|---|
| R language | Fedora repositories | R | Updated with normal DNF upgrades |
| RStudio Desktop | Posit RPM download | rstudio | Manual download and reinstall when Posit publishes a new RPM |
| RStudio Desktop | iucar/rstudio COPR | rstudio-desktop | Updated through DNF while the COPR remains enabled |
| R packages | Fedora repositories | R-<name> | Updated with normal DNF upgrades |
| R packages | CRAN | install.packages() | Updated from R with update.packages() |
| Additional CRAN RPMs | cran2copr | R-CRAN-<name> | Updated through DNF from the COPR repository |
Use only one RStudio Desktop method at a time. The Posit RPM package is named rstudio, while the iucar COPR package is named rstudio-desktop; the two packages conflict because they install the same application.
Update Fedora Packages
Refresh Fedora’s package metadata and apply pending updates before installing R. This reduces dependency problems, especially on systems that have not been updated recently.
sudo dnf upgrade --refresh
Install R from Fedora Repositories
Install the Fedora R metapackage. On Fedora 44, this pulls in the core R runtime, development files, Java integration packages, BLAS libraries, compilers, and build dependencies that many source-built R packages need.
sudo dnf install R
Check the installed R version after DNF finishes.
R --version
Relevant output begins with the installed R release and Fedora platform. Fedora 44 currently provides R 4.6.0.
R version 4.6.0 (2026-04-24) -- "Because it was There" Copyright (C) 2026 The R Foundation for Statistical Computing Platform: x86_64-redhat-linux-gnu
Install Extra Build Libraries for R Packages
Many common CRAN packages compile native code or link against system libraries. If package installation fails with missing header or library errors, install this common development set and retry the R package installation.
sudo dnf install libcurl-devel openssl-devel harfbuzz-devel fribidi-devel freetype-devel libpng-devel libjpeg-turbo-devel libxml2-devel
Install RStudio Desktop from Posit RPM
The direct Posit RPM is the official RStudio Desktop package. Posit’s download page is the source of truth for the filename; currently, the Fedora and Red Hat RPM points to rstudio-2026.04.0-526-x86_64.rpm.
Install the download and signature tools if they are missing from your Fedora system.
sudo dnf install curl gnupg2
Use the curl command to download the current RPM from Posit’s server.
RSTUDIO_RPM="rstudio-2026.04.0-526-x86_64.rpm"
RSTUDIO_URL="https://download1.rstudio.org/electron/rhel9/x86_64/${RSTUDIO_RPM}"
curl -fLO "$RSTUDIO_URL"
Import Posit’s Linux package signing key and verify the RPM signature before installing the local package.
gpg --keyserver keys.openpgp.org --recv-keys 51C0B5BB19F92D60
gpg --export --armor 51C0B5BB19F92D60 > posit-signing.key
sudo rpm --import posit-signing.key
rpm -K "$RSTUDIO_RPM"
The signature check should report valid digests and signatures after the key import.
rstudio-2026.04.0-526-x86_64.rpm: digests signatures OK
Inspect the local RPM metadata so the package name, version, architecture, and vendor are clear before installation.
rpm -qp --qf '%{NAME} %{VERSION}-%{RELEASE} %{ARCH} %{VENDOR}\n' "$RSTUDIO_RPM"
rstudio 2026.04.0+526-1 x86_64 Posit Software
Install the downloaded RPM with DNF so Fedora can resolve package dependencies.
sudo dnf install "./${RSTUDIO_RPM}"
Remove the downloaded RPM and temporary key export after installation. The imported RPM key remains in Fedora’s package database for later local RPM checks.
rm -f "$RSTUDIO_RPM" posit-signing.key
Verify the installed Posit package and command-line launcher.
rpm -q rstudio
rstudio --version
rstudio-2026.04.0+526-1.x86_64 2026.04.0+526
Install RStudio Desktop from iucar COPR
The Fedora Developer Portal documents the community-maintained iucar/rstudio COPR. Use this method when you prefer DNF-managed RStudio Desktop updates and accept the normal COPR tradeoff: packages are maintained outside Fedora’s official repositories.
This article covers RStudio Desktop. The same COPR also publishes an RStudio Server package, but server setup is a separate service workflow with different firewall, account, and removal considerations.
Install the COPR command plugin if your Fedora system does not already have it.
sudo dnf install 'dnf-command(copr)'
Enable the RStudio COPR and install the desktop package.
sudo dnf copr enable iucar/rstudio
sudo dnf install rstudio-desktop
Verify the COPR package if you used this method.
rpm -q rstudio-desktop
rstudio --version
Launch RStudio on Fedora
RStudio Desktop needs a graphical Fedora session. Start it from the terminal with the launcher installed by either RStudio package.
rstudio
You can also open RStudio from the GNOME desktop by searching for “RStudio” in Activities. The application entry appears after installation.
RStudio detects the R installation and opens an integrated R console. The main interface includes panes for scripts, console output, variables, package management, plots, and help.
Verify R on Fedora
Use Rscript for a quick terminal-based smoke test. This confirms that R can execute code without opening the interactive console.
Rscript -e 'print("Hello from R")'
[1] "Hello from R"
Check R’s active library paths when troubleshooting package locations or user-library prompts. A fresh Fedora install can show only the system library paths until you create a user library.
Rscript -e 'print(.libPaths())'
[1] "/usr/lib64/R/library" "/usr/share/R/library"
To use the interactive R console directly, run R. Exit the console with q() when finished.
Install R Packages on Fedora
Fedora supports three practical R package workflows. Use CRAN for the broadest package availability, Fedora packages when you want reviewed RPMs and DNF updates, and cran2copr when you need additional binary RPMs from a community COPR.
Install R Packages from CRAN
Install CRAN packages into your R library with install.packages(). Set a CRAN mirror explicitly so R does not pause for mirror selection.
Rscript -e 'install.packages("ggplot2", repos = "https://cloud.r-project.org")'
Load the package and print its installed version.
Rscript -e 'library(ggplot2); packageVersion("ggplot2")'
Update packages that were installed from CRAN with the same mirror setting.
Rscript -e 'update.packages(ask = FALSE, repos = "https://cloud.r-project.org")'
Remove a CRAN-installed package from your active R library with remove.packages().
Rscript -e 'remove.packages("ggplot2")'
Install Fedora-Packaged R Libraries with DNF
Fedora packages many R libraries as RPMs with an R- prefix. For example, install the Fedora package for ggplot2 with DNF.
sudo dnf install R-ggplot2
Search for Fedora-packaged R libraries by name before installing.
dnf search R-ggplot2
DNF-managed R packages update with the rest of Fedora.
sudo dnf upgrade --refresh
Use cran2copr for Additional Binary Packages
The iucar/cran COPR, also known as cran2copr, builds many additional CRAN packages as Fedora RPMs. Its packages use an R-CRAN- prefix and install under /usr/local/lib/R/library, which keeps them separate from Fedora’s official R library directories.
Enable the COPR only if you need packages that are not available as official Fedora RPMs or you specifically want cran2copr’s binary package workflow.
sudo dnf install 'dnf-command(copr)'
sudo dnf copr enable iucar/cran
Install packages directly by their cran2copr RPM name when you know the package exists.
sudo dnf install R-CRAN-tidyverse
For R-based COPR integration, install R-CoprManager. CoprManager can enable COPR-backed installs for supported CRAN packages while still letting R fall back to normal CRAN source installs when needed.
sudo dnf install R-CoprManager
Update R and RStudio on Fedora
Update Fedora-managed R packages, Fedora-packaged R libraries, and the COPR RStudio package with the standard DNF upgrade command.
sudo dnf upgrade --refresh
If you installed RStudio from the direct Posit RPM, check Posit’s download page for the newest RPM filename, download it, verify its signature, inspect the package metadata, and install the newer local RPM with DNF. The direct RPM does not add a DNF repository, so keep this update path manual unless you switch to the COPR method.
CRAN-installed packages are updated from R rather than DNF.
Rscript -e 'update.packages(ask = FALSE, repos = "https://cloud.r-project.org")'
Troubleshoot R and RStudio on Fedora
RStudio Package Is Not Found
If dnf search rstudio only shows R-rstudioapi, your system is still using Fedora’s official repositories. That package is an R helper API, not RStudio Desktop. Use the Posit RPM method or enable the iucar/rstudio COPR.
dnf search rstudio
Matched fields: name, summary R-rstudioapi.noarch Safely Access the RStudio API
RStudio COPR Metadata Times Out
COPR repositories can occasionally return slow metadata or gateway errors. If DNF reports a timeout for the iucar RStudio or cran2copr repository, refresh metadata and retry later before changing package commands.
sudo dnf clean metadata
sudo dnf upgrade --refresh
R Package Compilation Fails with Missing Headers
CRAN source installs may fail when a package needs system headers that are not installed. Common errors mention libraries such as curl, OpenSSL, HarfBuzz, FreeType, or XML.
configuration failed because libcurl was not found fatal error: harfbuzz/hb.h: No such file or directory fatal error: libxml/parser.h: No such file or directory
Install the common development packages and retry the original R package installation.
sudo dnf install libcurl-devel openssl-devel harfbuzz-devel fribidi-devel freetype-devel libpng-devel libjpeg-turbo-devel libxml2-devel
R Cannot Find an Installed Package
Check R’s library search path before reinstalling packages. Fedora’s system libraries, CRAN user libraries, and cran2copr libraries can live in different directories.
Rscript -e 'print(.libPaths())'
If the package was installed with sudo dnf install R-<name> or sudo dnf install R-CRAN-<name>, confirm the RPM is installed first.
rpm -q R-ggplot2
rpm -q R-CRAN-tidyverse
If the package was installed from CRAN into your user library, run the load test from the same user account that installed it.
Rscript -e 'library(ggplot2)'
Remove R and RStudio from Fedora
Use DNF for packaged software and separate commands for user data. Removing R packages does not automatically remove scripts, projects, notebooks, or datasets from your home directory.
Remove R Packages Installed by DNF
Remove the Fedora R metapackage and the core packages it installs.
sudo dnf remove R R-core R-core-devel R-devel R-java R-java-devel libRmath libRmath-devel
Verify that the main Fedora R packages are no longer installed.
rpm -q R R-core R-core-devel || true
Remove Posit RStudio Desktop
If you installed RStudio from Posit’s direct RPM, remove the rstudio package.
sudo dnf remove rstudio
rpm -q rstudio || true
Remove COPR RStudio Desktop
If you installed RStudio from iucar COPR, remove the package and disable the repository.
sudo dnf remove rstudio-desktop
sudo dnf copr remove iucar/rstudio
rpm -q rstudio-desktop || true
Disable cran2copr
If you enabled cran2copr, remove the COPR repository after uninstalling any COPR packages you no longer want. Removing the repository stops future updates from that source but does not remove already installed packages by itself.
sudo dnf copr remove iucar/cran
Remove User R and RStudio Data
User-data cleanup permanently deletes R libraries, startup files, command history, and RStudio settings from your home directory. Back up projects, scripts, notebooks, and preferences before removing any path.
The cleanup commands delete user-level R libraries, R profile files, R history, and RStudio configuration or cache directories. Review the detected paths before removing them.
find "$HOME" -maxdepth 3 \( -path "$HOME/R" -o -path "$HOME/.Rhistory" -o -path "$HOME/.Rprofile" -o -path "$HOME/.Renviron" -o -path "$HOME/.config/rstudio" -o -path "$HOME/.local/share/rstudio" -o -path "$HOME/.cache/rstudio" \) -print
After backing up anything you want to keep, remove the user-level files and directories.
rm -rf "$HOME/R" "$HOME/.Rhistory" "$HOME/.Rprofile" "$HOME/.Renviron"
rm -rf "$HOME/.config/rstudio" "$HOME/.local/share/rstudio" "$HOME/.cache/rstudio"
Conclusion
R is now installed from Fedora’s repositories, and RStudio Desktop can be managed through either Posit’s signed RPM or the community COPR workflow. For project history and collaboration, install Git on Fedora; if you also build compiled tooling, install Rust on Fedora.



Formatting tips for your comment
You can use basic HTML to format your comment. Useful tags currently allowed in published comments:
<code>command</code>command<strong>bold</strong><em>italic</em><blockquote>quote</blockquote>