π ~1 min read
Table of contents
Symptom & Impact
pkg upgrade fails due to incompatible version constraints between installed and target packages.
Environment & Reproduction
Often appears after mixed quarterly/latest repository usage.
pkg -vv | grep -A4 url
pkg upgrade -n
Root Cause Analysis
Repository branch mismatch or held packages create an unsatisfiable dependency graph.
Quick Triage
Detect held packages and confirm single repository branch usage.
pkg lock -l
pkg rquery '%n %v'
Step-by-Step Diagnosis
Inspect resolver output for first conflicting dependency edges.
pkg upgrade -n
pkg info -d

Solution – Primary Fix
Align repos, unlock stale pins, and perform full dependency-aware upgrade.
Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.
pkg lock -a -y
pkg unlock -y
pkg update -f
pkg upgrade -fy

Solution – Alternative Approaches
Temporarily remove conflicting package set and reinstall from a consistent branch.
Verification & Acceptance Criteria
Upgrade simulation reports no conflicts and target packages install cleanly.
Rollback Plan
Restore package state from snapshot if conflict resolution impacts application compatibility.
Prevention & Hardening
Enforce one repository branch policy per environment and track package locks.
Related Errors & Cross-Refs
pkg: cannot solve problem using SAT solver, conflict in dependencies.
Related tutorial: View the step-by-step tutorial for freebsd-12.
View all freebsd-12 tutorials on the Tutorials Hub β
Browse all common problems & solutions on the Tutorials Hub.
References & Further Reading
FreeBSD pkg repository branching and dependency resolution docs.
Need Expert Help?
If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today β we respond within one business day.