Skip to content

Instantly share code, notes, and snippets.

@reelsense
Last active July 7, 2018 18:06
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reelsense/b8604bb8c3c25450247a1f394582bda6 to your computer and use it in GitHub Desktop.
Save reelsense/b8604bb8c3c25450247a1f394582bda6 to your computer and use it in GitHub Desktop.
How to remove pkg-devel and reinstall pkg to resolve conflict

How to remove pkg-devel and reinstall pkg to resolve conflict

I updated pkg on my freebsd jail 2017-05-25 and it said it needed to update to pkg-1.10.1 but pkg-devel-1.10.99.4 was installed. This completely fucked me and made pkg inoperable.

The error:

Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:11:amd64/quarterly, please wait...
Verifying signature with trusted certificate pkg.freebsd.org.2013102301... done
[host.example.com] Installing pkg-1.10.1...
pkg-static: pkg-1.10.1 conflicts with pkg-devel-1.10.99.4 (installs files into the same place).  Problematic file: /usr/local/etc/bash_completion.d/_pkg.bash
 
Failed to install the following 1 package(s): /tmp//pkg.txz.GQ6IRg

I had to force bootstrap pkg and force remove pkg-devel and force bootstrap again to unfuck it.

The commands used:

pkg bootstrap -f ; pkg remove -f pkg-devel ; pkg bootstrap -f ; pkg update

This Gist is to help me remember how to unfuck pkg and to let Google index it to help others.

"how to remove pkg-devel and reinstall pkg"

If this helped you, consider the Value for Value model. https://bringyourwallet.com/donate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment