pkg ver is so slow

When I do a 'pkg ver' it takes almost 10 minutes to list my installed packages. Everything else with pkg is super fast. I can download and extract/install just fine. I did a 'pkg clean' and that didn't help. Is there anything else I can try to speed it up again?
 
Yes I did but I didn't see any flags that would be related to a speed problem. There is a reference to a index but I don't see any option to rebuild the index.
 
If you use ports then you will need to generate the index with make -C /usr/ports index. The actual contents of the INDEX-* depends on DEFAULT_VERSIONS for example. If you didn't change any of these you could just make -C /usr/ports fetchindex. See ports(7).

Code:
     index	      Create /usr/ports/INDEX, which is	used by	the
		      pretty-print-* and search	targets.  Running the index
		      target will ensure your INDEX file is up to date with
		      your ports tree.

     fetchindex           Fetch the INDEX file from the FreeBSD cluster.

A much quicker way is to simply force it to compare with a remote repository: pkg version -vR

pkg-version(8):
Code:
     The database of available packages and versions to compare against the
     installed packages may be chosen by specifying one of -P, -R or -I or by
     setting VERSION_SOURCE in pkg.conf(5).  If not specified then the ports
     index file will be used if it exists (-I).  Otherwise, should a ports
     tree exist that will be used to compare versions (-P).  Failing either of
     those two choices, the repository catalogue will be used (-R).
 
Back
Top