Use COPR repositories

COPR is Fedora's community build service that lets you easily enable third-party repositories to install software not yet in the official repos.

You need a package that isn't in the official repos

You run sudo dnf install some-tool and get No match for argument. You search the web, find a COPR link, and hesitate. Enabling a third-party repo feels risky. You worry about dependency hell or a broken update. The package you need is real, but the path to get it safely isn't obvious yet.

What COPR actually does

COPR stands for Cool Other Package Repo. It is a build service, not just a file host. When a maintainer submits a spec file, COPR spins up a clean Fedora container, downloads the source, and builds the RPM exactly like the official Fedora build system does. The result is a signed RPM package that integrates with dnf. You are not downloading a tarball and running a script. You are adding a repository that speaks the same language as the rest of your system.

Think of the official Fedora repositories as a main grocery store with strict quality control. COPR is a network of specialized vendors that use the same packaging standards and shipping containers. The difference is who packed the boxes. Official packages go through Fedora's review process. COPR packages are maintained by volunteers. The build process is secure and reproducible, but the maintainer's intent is up to you.

The dnf copr command is a plugin that automates the repo file generation. It writes the configuration to /etc/yum.repos.d/. This is the standard location for user-managed repository definitions. Files here override or supplement the base system repos. Never edit files in /usr/lib/yum.repos.d/. Those are owned by packages and will be overwritten on update.

Run dnf copr enable. The plugin handles the rest.

Enable a COPR repository

Here's how to enable a COPR repository using the standard plugin. The identifier format is owner/project. You find this on the COPR project page.

# Replace owner/project with the identifier from the COPR project page
sudo dnf copr enable atim/lazygit
# WHY: This downloads the .repo file and places it in /etc/yum.repos.d/
# WHY: It automatically handles the release version and architecture mapping
# WHY: The plugin imports the GPG key if the project provides one

Once the repo is enabled, install the package using the normal workflow.

# Install the package now that the repo is active
sudo dnf install lazygit
# WHY: dnf resolves dependencies across all enabled repos including the new COPR
# WHY: It checks GPG signatures automatically if the key was imported during enable
# WHY: The transaction history records the source repo for future rollback

Check the version output. If the command is not found, your PATH is misconfigured, not the repo.

Verify the installation

Confirm the package installed correctly and check which repository provided it. This helps you track where packages come from as your system grows.

# Verify the binary is installed and executable
lazygit --version
# WHY: Confirms the package installed successfully and is in your PATH
# Check which repo provided the package
dnf repoquery --installed --qf '%{name} from %{repo}' lazygit
# WHY: Shows the exact repository name that supplied the package
# WHY: Useful for auditing third-party packages on the system

Inspect the repo file to see the configuration details.

# View the generated repo file
cat /etc/yum.repos.d/_copr:copr.fedorainfracloud.org:atim:lazygit.repo
# WHY: Shows the baseurl, enabled status, and gpgcheck settings
# WHY: Confirms the repo points to the correct Fedora release version

Read the repo file. If enabled=0 appears, the repo is inactive and dnf will ignore it.

Common pitfalls and error messages

COPR repositories can fail for specific reasons. Recognizing the error saves time.

If you see Error: Failed to download metadata for repo 'copr:copr.fedorainfracloud.org:atim:lazygit', the repo might be disabled or the project removed. Check the COPR web page. If the project is disabled, dnf copr enable will fail with a clear message.

A GPG check FAILED error means the signature verification failed. This happens if the maintainer rotated keys and the repo file hasn't updated, or if the download was corrupted.

# Clear the dnf cache and retry
sudo dnf clean all
# WHY: Removes stale metadata and cached headers that might be corrupted
# WHY: Forces dnf to re-download repo information from the server
# Retry the installation after cleaning
sudo dnf install lazygit
# WHY: Tests if the GPG error was caused by a transient network issue

If the error persists, check the project page for a key update notice. Some maintainers update keys without warning. You may need to re-enable the repo to fetch the new key.

COPR packages can conflict with official packages or module streams. If you see Error: Transaction test error: package X conflicts with Y, the COPR package provides a file that overlaps with an official package.

# Disable the COPR repo to revert to official packages
sudo dnf copr disable atim/lazygit
# WHY: Stops dnf from considering packages from this repo
# WHY: Allows you to install the official version if available

Read the error message. GPG check FAILED means signature mismatch, not a broken disk.

Manage COPR repositories

Over time, you may accumulate COPR repositories. Manage them to keep the system clean.

List all COPR repositories currently configured.

# List all COPR repositories and their status
dnf copr list
# WHY: Shows owner/project pairs and whether they are enabled or disabled
# WHY: Helps you audit third-party sources on the system

Disable a repo to stop using it without deleting the configuration. This is useful for troubleshooting or temporarily reverting to official packages.

# Disable the repo without deleting the config file
sudo dnf copr disable atim/lazygit
# WHY: Sets enabled=0 in the .repo file
# WHY: Keeps the .repo file on disk for quick re-enablement later
# WHY: Packages installed from this repo remain on the system

Remove the repo file entirely when you no longer need it.

# Remove the repo file from the system
sudo dnf copr remove atim/lazygit
# WHY: Deletes the .repo file from /etc/yum.repos.d/
# WHY: Packages installed from this repo remain on the system
# WHY: Future upgrades will not pull updates from this source

Disable before you remove. Disabling preserves the config for quick re-enablement.

Decision matrix

Use dnf copr enable when you want the plugin to handle repo file generation and key imports. Use manual repo installation when the project provides a custom URL that the plugin cannot resolve. Use dnf copr disable when you suspect a COPR package is causing a conflict and need to revert quickly. Use dnf copr remove when you no longer need the repository and want to clean up your configuration. Trust official repos when security and stability are the priority. Trust COPR when you need software that is not in the official repositories and the maintainer has a good reputation.

Security and trust

COPR packages are not vetted by the Fedora Security Team. The build environment is isolated, but the source code comes from the maintainer. Review the project page. Check the commit history. Look for activity. If a repo has been inactive for two years, the packages might be outdated or vulnerable.

You can inspect the source before installing. COPR provides the spec file and source tarballs. Download the spec file. Read the %build and %install sections. Look for suspicious commands.

# Download the spec file for review
curl -O https://copr.fedorainfracloud.org/coprs/atim/lazygit/package/lazygit/lazygit.spec
# WHY: Retrieves the build script used to create the RPM
# WHY: Allows you to inspect build steps and dependencies manually

Review the spec file. Source code lies less than descriptions.

Run dnf upgrade --refresh weekly. This updates metadata for all repos, including COPR. It ensures you get the latest packages and security fixes.

Where to go next