# I ran pkg2ng and broke something



## hlt32 (Oct 28, 2018)

I'm running FreeNAS 11.2-rc2.

I was trying to install vim and openvpn in a jail, but the packages were not found in the repo.

I followed some instructions I found to run pkg2ng, and received the following: *https://pastebin.com/whdzNrf2*

Now I can't update, upgrade, or install any packages - can someone please explain what I did wrong and how to start fixing this?

Thanks


----------



## hlt32 (Oct 28, 2018)

I think I fixed it.

/usr/local/etc/pkg/repos/local.conf -> enabled: no
/usr/local/etc/pkg/repos/FreeBSD.conf -> enabled: yes

then pkg update && pkg upgrade


----------



## talsamon (Oct 28, 2018)

`pkg2ng` needs to removed, it is not needed anymore.
Try
`/usr/sbin/pkg bootstrap -f`
or
`pkg-static install -f pkg`


----------



## kpa (Oct 28, 2018)

You were reading some very outdated information, pkg2ng is from about 5 years ago when the transition from the old style packages to the pkg packages was realized and the pkg2ng tool was needed to convert the old style database to the pkg format.

After running the commands above you can then follow them with:

`# pkg upgrade -f`

This will reinstall every package on the system while keeping the configurations intact.


----------



## talsamon (Oct 28, 2018)

I make a PR to remove `pkg2ng` from ports-mgmt/pkg: PR 232768.


----------



## SirDice (Oct 29, 2018)

hlt32 said:


> I'm running FreeNAS 11.2-rc2.


PC-BSD, FreeNAS, XigmaNAS, and all other FreeBSD Derivatives


----------

