Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been using the purge utility ie.

squidclient -m PURGE

The above command will purge that exact link but it leaves everything else under it in the cache. (eg

I was wondering is there a way to purge every document under that url?

Thanks in Advance Ruth

share|improve this question
up vote 2 down vote accepted

The 3rd-party purge utility will do exactly what you seek:

The purge tool is a kind of magnifying glass into your squid-2 cache. You can use purge to have a look at what URLs are stored in which file within your cache. The purge tool can also be used to release objects which URLs match user specified regular expressions. A more troublesome feature is the ability to remove files squid does not seem to know about any longer.

For our accelerating (reverse) proxy, I use a config like this:

purge -c /etc/squid/squid.conf -p localhost:80 -P0 -se ''

-P0 will show the list of URLs but not remove them; change it to -P1 to send PURGE to the cache, as you do in your example.

share|improve this answer
Thank You, that helprd – user33237 Feb 18 '10 at 10:11

We have a lot of ways to purge. Example 2 ways I alway use:

With client using MacOS or Linux:

curl -X PURGE http://URL.of.Site/ABC.txt

Direct on server which is running Squid:

squidclient -m PURGE http://URL.of.Site/ABC.txt

Absolutely, squid.conf must add

acl Purge method PURGE
http_access allow localhost Purge
http_access allow localnet Purge
http_access deny Purge
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.