The Handbook

    Theme
    • Guides
        • Check a system before installing FreeBSD
        • Orient a Linux administrator on FreeBSD
        • Supported FreeBSD releases
        • Choose a FreeBSD documentation and support channel
        • Move files safely without GNU mv -t
        • Update, upgrade, or update packages?
        • Upgrade 14.4 or 15.0 to FreeBSD 15.1
        • Choose packages, ports, or poudriere
        • Choose the quarterly or latest package branch
        • Choose a FreeBSD download or package mirror
        • Make a system setting persistent
        • Configure locale, keyboard, and time zone
        • Configure a serial console for recovery
        • Choose a custom kernel, module, or loader setting
        • Run a Linux binary with the compatibility layer
        • Check desktop and laptop hardware before installation
        • Choose and check a graphics driver
        • Choose Xorg or Wayland
        • Build a maintainable desktop baseline
        • Install and check a desktop browser
        • Check laptop Wi-Fi, power, and suspend
        • Check multimedia readiness
        • Choose and configure a printing stack
        • Run Windows applications with Wine
        • Snapshot and replicate a ZFS dataset
        • Choose a filesystem and storage layout
        • Operate ZFS without losing the recovery path
        • Restore files from a ZFS snapshot
        • Read ZFS pool health and run a scrub
        • Replace a failed device in a ZFS mirror
        • Replicate a ZFS dataset over SSH
        • Change PF safely on a remote host
        • Configure a narrow WireGuard tunnel
        • Plan a FreeBSD home server
        • Choose a mail server or an outgoing relay
        • Publish a network service safely
        • Choose a jail network model
        • Choose native jails or a jail manager
        • Choose a jail or a bhyve virtual machine
        • Establish a FreeBSD security baseline
        • Choose a MAC policy
        • Audit security-relevant activity
        • Start a DTrace performance investigation
    • Integrations
        • Create a first jail with Bastille
        • Compare jail managers and OCI tooling
        • Publish a Bastille service through PF
        • Mount a ZFS dataset in a Bastille jail
        • Update and upgrade Bastille jails
        • Back up and restore a Bastille jail
        • Prepare bhyve and vm-bhyve
        • Choose NFS or Samba for file sharing
        • Choose ZFS backup automation
        • Operate a signed poudriere repository
        • Manage FreeBSD configuration with Ansible or Salt
        • Run Motion with webcamd on FreeBSD
        • Design a reverse proxy, certificates, and monitoring
    • FAQ
      • Troubleshooting
          • Recover an interrupted freebsd-update run
          • Resolve a package repository or ABI mismatch
          • Diagnose the FreeBSD boot path
          • Recover with a ZFS boot environment
          • Diagnose DNS, routing, and firewall paths
          • Diagnose network mbuf exhaustion
          • Bind a service to a low port without running it as root
          • Diagnose audio output or input
          • Diagnose webcamd, cuse, and a webcam
          • Fix USB device permissions without opening every device
      • About this handbook
      • Synopsis
      • Record the four identities
      • Classify the mismatch
      • Inspect repository overrides
      • Refresh metadata after correcting policy
      • Complete a major ABI transition
      • Escalate with a reproducible record
      • Primary references

      Resolve a package repository or ABI mismatch

      Last reviewed
      13 August 2026
      Applies to
      15.1-RELEASE, 15.0-RELEASE, 14.4-RELEASE

      Synopsis #

      An ABI or repository error usually means that the installed userland, effective pkg ABI, enabled repository, package branch, or upgrade phase does not agree with the others. Changing ABI, OSVERSION, or a repository URL can suppress a useful safety check and install unusable packages.

      Collect the evidence first. Command-line ABI overrides belong only in a release procedure that explicitly requires them, such as the documented 15.0 pkgbase upgrade to 15.1.

      Record the four identities #

      Capture the running kernel, installed kernel, installed userland, machine architecture, and effective package configuration:

      $ freebsd-version -kru
      $ uname -m
      $ uname -p
      $ pkg -vv
      $ pkg repositories
      

      Then determine whether the base system itself is packaged:

      $ pkg which /usr/bin/uname
      

      Finally, inspect the architecture recorded on representative installed packages:

      $ pkg info pkg
      

      Save the complete failing command and error. Phrases such as “wrong architecture,” “repository does not contain packages,” “newer FreeBSD version for package,” a missing catalogue, and an unexpected mass removal describe different failures.

      Classify the mismatch #

      EvidenceLikely causeCorrect boundary
      Release is no longer supportedRepository may have been retiredUpgrade the operating system to a supported release
      Kernel and userland differ immediately after a kernel installRelease upgrade is between phasesReboot or continue the documented upgrade sequence
      Effective repository uses the wrong branchLocal override or stale configurationCorrect the repository policy, then refresh metadata
      Package architecture differs from the hostWrong repository, package file, or unsupported manual overrideRemove the override and select packages for the actual ABI
      Error appears during a documented major upgradeABI transition is incompleteUse the exact target release instructions
      Private and official repositories both provide the same originsRepository policy is incoherentSelect priorities or one package source deliberately

      Confirm that the installed release remains listed on the supported-release page . An archived repository is not a maintenance strategy for an end-of-life host.

      Inspect repository overrides #

      Review files under /etc/pkg/ and /usr/local/etc/pkg/repos/. Release-supplied configuration belongs under /etc; local overrides belong under /usr/local/etc/pkg/repos/.

      Look for:

      • a hard-coded architecture instead of ${ABI};
      • a quarterly/latest path inconsistent with the intended policy;
      • a fixed old release or package mirror;
      • multiple enabled repositories supplying the same package origins;
      • a kernel-module repository for a different release or ports branch;
      • a global ABI or OSVERSION setting added as an earlier workaround.

      The quarterly or latest guide describes a controlled branch change. The broader packages, ports, or poudriere guide explains when a private repository is the maintainable answer. When the evidence points to routing or availability rather than ABI policy, preserve automatic fallback with the download and package mirror guide .

      Refresh metadata after correcting policy #

      After the release, ABI, and repository configuration agree, force a catalogue refresh and perform a dry run:

      # pkg update -f
      # pkg upgrade -n
      

      Inspect all removals, replacements, repository changes, and downgrades. Do not proceed when the transaction still proposes unexplained broad removal.

      Check package-database dependencies separately:

      # pkg check -d -a
      

      This detects missing package dependencies; it does not prove that a third-party kernel module matches the running kernel or that a service can restart.

      Complete a major ABI transition #

      After a distribution-set upgrade between major FreeBSD versions, the official Handbook requires installed third-party packages to be replaced for the new ABI and documents:

      # pkg-static upgrade -f
      

      Use that command only at the package phase of the corresponding release upgrade, after the new base userland is installed. For the current target, follow the 15.1 upgrade checklist and the official 15.1 instructions. Do not use a forced reinstall as the first response to a network or branch error.

      Escalate with a reproducible record #

      When the corrected configuration still fails, retain:

      • freebsd-version -kru and uname -mp;
      • the repository portion of pkg -vv;
      • pkg repositories;
      • the complete pkg update -f output;
      • the exact upgrade phase and source release;
      • whether the host uses distribution sets, pkgbase, or a source-built base.

      Remove credentials and private repository tokens before sharing the record.

      Primary references #

      • FreeBSD Handbook: package repositories and package branches
      • FreeBSD Handbook: packages after a major-version upgrade
      • FreeBSD 15.1-RELEASE upgrading instructions
      • pkg(8)
      • pkg.conf(5)
      • pkg-repositories(8)
      • pkg-check(8)

      Independent documentation. Not affiliated with or endorsed by the FreeBSD Project or the FreeBSD Foundation.

      Report a bug
      • Synopsis
      • Record the four identities
      • Classify the mismatch
      • Inspect repository overrides
      • Refresh metadata after correcting policy
      • Complete a major ABI transition
      • Escalate with a reproducible record
      • Primary references