Solved find missing package files?

So to make a long story short, I managed to crash the machine shortly after doing the last big 'pkg upgrade' and my reward is errors like "xterm: not found".

(If you wonder how this happened, think "drm-kmod".)

pkg thinks it's installed, but the final binary is missing. Same for firefox & some others that I noticed and reinstalled. Some other pkgs are working fine.

So my question, instead of trying to remove & reinstall everything, is there a tool to check if all the files installed by a pkg are still in place?
 
Yes, apparently what I needed was "pkg check -s -a".

I was returning to report. Thanks for the pointer!

(What a mess....)
 
I think I have everything cleaned up. (It's good to have a systematic tool to check.)

In case anyone is curious, here is the sequence that ended up here:

1) Power outage... a few hours, enough to stress me, especially on a work day....
2) Forgot that I needed to do `kldload amdgpu` by hand when starting!
(I took it out of rc.conf so I wouldn't have to worry about the machine not booting due to drm-kmod pkg/port version issues, and since I only need it when I'm at the desktop anyway....)
3) When X wouldn't start, I thought "Hey, maybe I need updates...."
(This was especially a foolish approach, since I caught up on updates just this weekend!)
4) But lo' & behold, here are quarterlies (I guess it's called?), and `pkg upgrade` included drm-kmod pkgs...
5) Since I hadn't loaded the old amdgpu already, I went ahead and did it right then, without a reboot... crash!
...
6) Various problems trying to get X going until I realized that I was missing files (e.g. `xterm` itself!)
7) Reinstalled pkgs....
 
You can force a reinstall of everything with pkg upgrade -f

Code:
     -f, --force
                 Force the reinstallation or upgrade of the whole set of
                 packages.
pkg-upgrade(8)
 
Back
Top