-Dkk will perform on the repos, what is available, not what you have.
Something more like what OP is asking for might be
pacman -Qkk | grep -v '0 altered files'
Though I fear what this will mean for people looking at the output.
Its likely there willl be ‘modified’ files or ‘mismatched time’ etc that is ignorable.
Well, the single Dk
pacman -Dk
will report big goofs like missing dependencies… though that will likely only happen if someone did -Rdd
manually.