error pkg: repository meta /var/db/pkg/FreeBSD.meta has wrong version 2

Solved error install or update , message error pkg: repository meta /var/db/pkg/FreeBSD.meta has wrong version 2 .Freebsd 11

Updating FreeBSD repository catalogue…
pkg: repository meta /var/db/pkg/FreeBSD.meta has wrong version 2
pkg: Repository FreeBSD load error: meta cannot be loaded No error: 0
Fetching meta.txz: 100% 916 B 0.9kB/s 00:01
pkg: repository meta /var/db/pkg/FreeBSD.meta has wrong version 2
repository FreeBSD has no meta file, using default settings
Fetching packagesite.txz: 100% 6 MiB 2.2MB/s 00:03
pkg: repository meta /var/db/pkg/FreeBSD.meta has wrong version 2
pkg: Repository FreeBSD load error: meta cannot be loaded No error: 0
Unable to open created repository FreeBSD
Unable to update repository FreeBSD
Error updating repositories!

Solution :

pkg bootstrap -f ; pkg update -f

Posted on: April 17, 2021, by :