How do I remove the "where" clause from a structured query object in hook_query_alter()?
That's pretty much all there is to it: in hook_query_alter() you only have access the query object from "outside" and, since there is no public API to remove conditions, it's kinda confusing.

However, there's some clever php hackery going on so if you call $where =&amp; $query-&gt;conditions(); or any of the other examples in the documentation you linked it will return a reference to that corresponding variable.

So, in the where example above, you gain access to $query-&gt;where protected class variable.  If you inspect them you will see they are just basic php arrays containing all of the information and you can literally just unset something on that reference and be done.

So:


$where =&amp; $query-&gt;conditions();
// Remove the second condition. 
unset($where[1]);


Finally, specifically with where queries, you want to be mindful of the #conjunction and eventual more complex and/or grouping stuff.