How can I delete a cookie from a plugin? I am able to set a plain old cookie like this:

$cookie = new HttpCookie('myCookie', 'myValue');


I am trying to delete it like this:

$cookie = new HttpCookie('myCookie', '');
craft()-&gt;request-&gt;getCookies()-&gt;add($cookie-&gt;name, $cookie);


When I make a call to check the cookie, I get this returned:

{"name":"myCookie","value":"","domain":"","expire":0,"path":"\/","secure":false,"httpOnly":true}


I can see that the value is getting cleared, but is there any way to just totally wipe out the cooke?
I wasn't able to find an answer for removing a cookie in Craft 3 so after plenty of time of trying to figuring it out, this is my conclusion. 

First of all, I am setting the cookie using the following method.

$cookie = new Cookie(['name' =&gt; 'cookieName']);
$cookie-&gt;value = $data['accessToken'];
$cookie-&gt;expire = $data['expires'];
Craft::$app-&gt;getResponse()-&gt;getCookies()-&gt;add($cookie);


I kept running into a problem with the Cookies being set are read-only so in order to remove the cookie need to use response to change and remove cookies.

Craft::$app-&gt;response-&gt;cookies-&gt;remove('cookieName');