FreeBSD pkg 1.3 error

My home server is running FreeBSD 10. Recently, The pkg(8) utility updated itself to 1.3, and I started getting the following error/warning:

pkg: Repo FreeBSD needs schema upgrade from 2006 to 2010 but it is opened readonly
pkg: need to re-create repo FreeBSD to upgrade schema version

The man page and my Google-fu failed me, so I turned to the freebsd-questions mailing list. Dr Matthew Seaman had the solution:

pkg clean -a
pkg update -f

Or as he put it, “should restore sanity.” And to his credit, it did. So if anyone else has the same problem, hopefully this post will show up in your Googling.