rubyをportupgradeした後、portsclean -DDPPをすると、次のエラーが出た。
直し方は?

[Updating the pkgdb <format:bdb_btree> in /var/db/pkg ... /var/db/pkg/pkgdb.db:
unexpected file type or format -- Invalid argument; rebuild needed]
[Rebuilding the pkgdb <format:bdb_btree> in /var/db/pkg ...
/usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:529:in `update_db':
/var/db/pkg/pkgdb.db: unexpected file type or format -- Invalid
argument: Cannot update the pkgdb!]: Cannot update the pkgdb!] (PkgDB::DBError)
from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:592:in `open_db'
from /usr/local/lib/ruby/site_ruby/1.8/pkgdb.rb:772:in `installed_ports'
from /usr/local/sbin/portsclean:232:in `distclean'
from /usr/local/sbin/portsclean:228:in `distclean'
from /usr/local/sbin/portsclean:151:in `main'
from /usr/local/lib/ruby/1.8/optparse.rb:815:in `initialize'
from /usr/local/sbin/portsclean:67:in `main'
from /usr/local/sbin/portsclean:684