I ended up with this:
<?php
$cookie_string = implode(array_keys($_COOKIE));
$pos = strpos($cookie_string,'wp-postpass');
$pass_cookie = substr($cookie_string,$pos);
setcookie($pass_cookie,'',0);
?>
This is probably not the most elegant solution, especially because it requires the wp-postpass cookie to be the last in the array.
source
share