How do you reset a cart under Craft Commerce 2?
The commerce/cart/remove-all-line-items action (or in Craft 2 terms, commerce/cart/removeAllLineItems) was deprecated (and subsequently removed in Commerce 3), so it's up to you to build a form to explicitly delete all line items:
&lt;form method=&quot;post&quot;&gt;
    {{ csrfInput() }}
    {{ actionInput('commerce/cart/update-cart') }}

    {% for lineItem in craft.commerce.carts.cart.lineItems %}
        &lt;input type=&quot;hidden&quot; name=&quot;lineItems[{{ lineItem.id }}][remove]&quot; value=&quot;✓&quot;&gt;
    {% endfor %}

    &lt;button type=&quot;submit&quot;&gt;Empty Cart&lt;/button&gt;
&lt;/form&gt;

This snippet just loops over the current line items, and outputs a hidden input element, which sends the proper POST value to the update-cart action.
It's also possible to give your customer control over which line items are to be removed by changing the input to a check-box (and providing adequate labeling).