---
title: unset
summary: null
url: https://www.fastly.com/documentation/reference/vcl/statements/unset
---

**Available in:** all subroutines

Unsets a variable or HTTP header.

```vcl
unset fastly.error;      # Predefined variable
unset resp.http.Expires; # HTTP header
unset req.http.X-*;      # Unset all X- headers
```

While primarily used for removing HTTP headers from request or response objects, `unset` may also be used to clear some predefined variables (where indicated on the variable's reference page as "can be unset").

If the HTTP header named ends in an asterisk (`*`) character, it acts as a wildcard prefix match and all matching header names will be unset.
