I agree with @deepak-git-account and in general that IETF RFC functionality should be implemented also for IMS domain. And it would be good if the P-CSCF registrar would delete all Contacts locally.
But... things are a bit more complex. 3GPP TS 24.229 does specify a behavior of "*" Contact, yet not for the P-CSCF, only for the S-CSCF. Or??
So IMHO this operation is **not fully applicable at a single P-CSCF**. You can have multiple phones registering the same identity (IMPU). Since not all these phones roam in the same networks, a de-register "*" would anyway only have the proper full effect at the S-CSCF, which would then push `reg-info` notifications to all the P-CSCF instances serving those IMPUs and having Contacts stored in their local reverse-registrars.
**tl;dr - a de-registration with "*" would have a limited local P-CSCF instance effect, hence it's probably better that it's not specified at P-CSCF, to avoid confusion. The S-CSCF-triggered `reginfo` notifications should cleanup all the state in all the P-CSCF instances.**
How could one then trigger a complete de-registration? There are valid use-cases... but there are also administrative de-registration procedures to achieve this triggered from network-side... I'm genuinely curious, since I'm also bothered by the garbage left behind by IMS devices re-attaching. But I'm thinking that the bugs might be at the S-CSCF (e.g. see https://github.com/kamailio/kamailio/pull/3895 for `reginfo` subscribers cleanups) ...
Do you have a phone which can trigger this?