It depends what you're trying to achieve. If you want to programmatically empty the cart using PHP, this will do the trick (Store v2):
// load the Store module if you haven't already
In Store v1:
By the time you're doing that though, you may as well just use a small checkout form with an
empty_cart button instead of linking to the page in question.