Varnish is extremely fast and configurable reverse proxy server so it’s very popular. This examples shows how common task can be done using varnishadm command.
How to flush whole varnish’s cache?
# varnishadm ban "req.url ~ ."
How to flush cache for specified URLs only?
For URL starting with ‘/path/to/url’
# varnishadm ban "req.url ~ /path/to/url"
For exact path ‘/path/to/url’
# varnishadm ban "req.url == /path/to/url"
How to flush cache for specified domain only?
# varnishadm ban "req.http.host == domain.com"
Now you can verify that cache was really flushed in web server logs.