[Solved] FreeBSD PKG error: pkg: repository meta /var/db/pkg/FreeBSD.meta has wrong version 2

When pkg search grafana reports the following error:
pkg: repository meta /var/db/pkg/FreeBSD.meta has wrong version 2
pkg: Repository FreeBSD load error: meta cannot be loaded No error: 0
pkg: repository meta /var/db/pkg/FreeBSD.meta has wrong version 2

Solution:

pkg delete -f pkg  
  
pkg install pkg

Read More: