Skip to content
Search Fedora

    Browse this documentation

    COPR third-party repositories: enabling them and what risk you take on

    COPR (Cool Other Package Repo) is where Fedora community members build their own RPMs. It gets you packages that are not in the official repositories, at the price of those packages carrying no Fedora quality or security endorsement.

    Below is the measured flow, including the disclaimer people tend to skip.

    dnf copr comes from dnf5-plugins:

    Terminal window
    rpm -q dnf5-plugins
    dnf copr --help
    Commands:
    list list Copr repositories
    enable download the repository info from a Copr server and install it as a /etc/yum.repos.d/*.repo file
    disable disable specified Copr repository (if exists), keep /etc/yum.repos.d/*.repo file - just mark enabled=0
    remove remove specified Copr repository from the system (removes the /etc/yum.repos.d/*.repo file)
    debug print useful info about the system, useful for debugging

    The four verbs are distinct; a table compares them again below.

    Terminal window
    sudo dnf copr enable garrus/clang-opt fedora-45-x86_64

    The second argument is the chroot, format NAME-RELEASE-ARCH. Omit it and it is detected.

    Enabling prints this warning (verbatim):

    Enabling a Copr repository. Please note that this repository is not part
    of the main distribution, and quality may vary.
    The Fedora Project does not exercise any power over the contents of
    this repository beyond the rules outlined in the Copr FAQ at
    <https://docs.copr.fedorainfracloud.org/user_documentation.html#what-i-can-build-in-copr>,
    and packages are not held to any quality or security level.
    Please do not file bug reports about these packages in Fedora
    Bugzilla. In case of problems, contact the owner of this repository.

    Worth reading line by line:

    TextMeaning
    not part of the main distributionoutside the distribution
    quality may varyquality is not guaranteed
    not held to any quality or security levelno quality or security endorsement at all
    do not file bug reports ... in Fedora Bugzillaproblems go to the repo owner, not Fedora
    Terminal window
    ls /etc/yum.repos.d/
    _copr:copr.fedorainfracloud.org:garrus:clang-opt.repo

    The filename encodes the repository identity. Contents:

    [copr:copr.fedorainfracloud.org:garrus:clang-opt]
    name=Copr repo for clang-opt owned by garrus
    baseurl=https://download.copr.fedorainfracloud.org/results/garrus/clang-opt/fedora-45-x86_64/
    type=rpm-md
    skip_if_unavailable=True
    gpgcheck=1
    gpgkey=https://download.copr.fedorainfracloud.org/results/garrus/clang-opt/pubkey.gpg
    repo_gpgcheck=0
    enabled=1
    enabled_metadata=1

    Three things stand out:

    • gpgcheck=1 but repo_gpgcheck=0: packages are signature-checked (against this COPR’s key), metadata is not;
    • gpgkey points at the COPR’s own key, not the Fedora keys already on your system;
    • baseurl embeds fedora-45-x86_64, so the chroot is fixed — after a release upgrade you must re-enable.
    Command.repo fileenabled=Uninstalls packages?
    enablecreated1no
    disablekeptchanged to 0no
    removedeleted—no
    dnf remove <pkg>unchangedunchangedyes

    Measured disable:

    Terminal window
    sudo dnf copr disable garrus/clang-opt
    Copr repository 'copr.fedorainfracloud.org/garrus/clang-opt' in '/etc/yum.repos.d/_copr:copr.fedorainfracloud.org:garrus:clang-opt.repo' disabled.

    The file stays and enabled becomes 0. To remove it entirely:

    Terminal window
    sudo dnf copr remove garrus/clang-opt
    Repo file /etc/yum.repos.d/_copr:copr.fedorainfracloud.org:garrus:clang-opt.repo successfully removed

    remove does not uninstall packages that came from the repo. That takes a separate dnf remove, which can pull in a chain if other packages depend on it.

    The most common error:

    Terminal window
    sudo dnf copr enable garrus/clang-opt fedora-44-x86_64
    Chroot not found in the given Copr project (fedora-44-x86_64).
    You can choose one of the available chroots explicitly:
    fedora-45-i386
    fedora-45-x86_64

    The good news is that it lists the available chroots — just copy one. Much friendlier than “project does not exist”.

    SituationAdvice
    small desktop tools, editor pluginsfine, the risk is acceptable
    runtimes or databases on production serversno — use official repositories or your own
    packages you need to stay stableno; COPR builds can disappear
    trying something on a test machineyes; copr remove afterwards

    The test is not “is this package good” but can you handle it when it breaks. A COPR is owned by an individual: the project can be abandoned, the builds deleted.

    On systems without dnf5-plugins, the file above can be written manually:

    Terminal window
    sudo tee /etc/yum.repos.d/copr-clang-opt.repo >/dev/null <<'EOF'
    [copr:copr.fedorainfracloud.org:garrus:clang-opt]
    name=Copr repo for clang-opt owned by garrus
    baseurl=https://download.copr.fedorainfracloud.org/results/garrus/clang-opt/fedora-45-x86_64/
    type=rpm-md
    skip_if_unavailable=True
    gpgcheck=1
    gpgkey=https://download.copr.fedorainfracloud.org/results/garrus/clang-opt/pubkey.gpg
    repo_gpgcheck=0
    enabled=1
    EOF
    sudo dnf makecache
    Terminal window
    dnf copr list
    copr.fedorainfracloud.org/garrus/clang-opt

    To find where a package came from:

    Terminal window
    dnf repoquery --installed --qf '%{name} %{from_repo}\n' | grep -i copr