Selectively remove Squid-2 cache contents
 


The purge-*-src.tar.gz is the end user supplied version, the purge-*-all.tar.gz is the developer version with the revision control tree and all sources checked in. So, if we happend to miss again a source file, try the all version...

As the software was developed using Linux 2.2.x, Solaris 2.5.1 .. 7, it works up to expectations on the Solaris platform, the FreeBSD 4.x platform and the Linux glibc2 platform. We cannot make any guarantees for other platforms at this point in time.

Release Software Comments
01.02.2004
Current stable release
purge-20040201-src.tar.gz
purge-20040201-all.tar.gz
Cosmetic README file changes only.
Last modified:
21.09.2000
Current stable release
purge-20000921-src.tar.gz
purge-20000921-all.tar.gz
Changed -c flag to read squid.conf configuration file, and parse it for occurances of cache_dir. Now incorporates a parallel mode, one process for each cache_dir, which can be switched into regular mode via -n.
Last modified:
20.06.2000
old stable
purge-20000620-src.tar.gz
purge-20000620-all.tar.gz
Added FreeBSD support.
No longer available
29.03.2000
old stable
purge-20000329-src.tar.gz
purge-20000329-all.tar.gz
Added some understanding of the Squid meta data into program, added extended meta data, inverted the meaning of the "-M" switch, added copy-out mode to retrieve objects directly from the stored file, fixed missing CRLF in "-s" mode, added port number precedence over host name in "-p" when there is no colon.
No longer available
25.01.1999
outdated
purge-19990125-src.tar.gz
purge-19990125-all.tar.gz
More Linux strange behaviour. Also, some fixes somehow didn't make it into the Makefile, thus missing out sources in the previous release.
No longer available
23.01.1999
outdated
purge-19990123-src.tar.gz
purge-19990123-all.tar.gz
psignal is in <signal.h> in Linux, but in <siginfo.h> on other systems. Sigh, how did you say automake works? Also, libc5 displays a header inconsistency, as putchar() depends on putc() which is defined via _IO_putc(). The latter is not in libc5, thus causing the linker to complain...
No longer available
22.01.1999
outdated
purge-19990122-src.tar.gz
purge-19990122-all.tar.gz
Fixed missing source file bug (ooopsy).
No longer available
20.01.1999
outdated
purge-19990120-src.tar.gz first public release to peer group.
No longer available

You will need GNU make to be able to compile it. A g++ 2.7.x will do, but will need changes in the Makefile to the -mcpu and -march parameters passed to the compiler. Version 2.8.x is preferred. Also, most native compiler should nag a little, but after fixing a few lines, they should do fine, too. Linux, Solaris and Irix (-n32) should work by default. If the Irix compiler complains about not finding be.so, copy, paste, and execute the final link command from your command line.

You most certainly want to have a look into the README file to the project before deciding to download anything. Also note that you must use GNU make for compilation. Due to the use of RCS, the distribution files are mode 0400, including the Makefile.

Here are some binary version for those who were unable to compile the thingy. Nevertheless, please do not hesitate to contact us, if you have problems either compiling or running the purge program. Please note again the no warranties policies mentioned in the README.

Last Update Software Remarks

purge-i586-linux-2.2.16-glibc2.tar.gz Linux 2.2.16, Pentium optimization, glibc2 (aka libc6), g++ 2.95.2 compiled binary (currently not available).

squidpurge-1.17_2.tgz FreeBSD 4.0-RELEASE, g++ 2.95.2 compiled binary.

purge-SPARC-solaris-7.tar.gz Solaris 7, UltraSPARC optimization, Sun WS 5.0 compiled binary (currently not available).

purge-MIPS3-R4k-irix-6.5-n32.tar.gz Irix 6.5, MIPS3/R4000 optimization, MIPSPro 7.2 compiled binary, using the -n32 execution environment (currently not available).

For further information, please read the README. Due to a mistake, the binary distributions contain an outdated README file.

Please note again, that you are using the purge tool at your own risk. There are no guarantees whatsoever. You were warned!

Here are some questions and answers:

How do I print all objects in my cache?

Just run with the match-all regular expression:
	purge -e .

How do I remove all MP3 files from my cache?

Replace the template <port> below with your cache port. Make sure, you enabled the PURGE method in your configuration:
	purge -p localhost:<port> -P 1 -se '\.mp3$'

Use the case-insensitive version to catch Windoze all-caps suffices. Use a backslash to escape to period within the regular expression. Use a dollar sign to indicate a file suffix. Use quotes to escape meta chars within the expression from the shell.

Okok, admittedly, my parsing of squid.conf could determine the hostname and port number for you, but the parsing feature is rather new.

How do I remove MP3 files from geocities eating up my cache?

Replace the template <port> below with your cache port. Make sure, you enabled the PURGE method in your configuration:
	purge -p localhost:<port> -P 1 -se 'geocities\.com/.*\.xls'

Many users on geocities masquerade their MP3 archives as Äksel sheets.

I don't won't my input to be observed, e.g. .bash_history?

You can use stdin as input file, if your System uses the /dev/fd directory:
	purge -sf /dev/fd/0 -P 1 -p localhost:<port>
Just type in the regular expressions, separated by a linefeed from each other, and after the last one, on a new line, press <Ctrl>+<D>.

How do I rescue server w3.org from my cache contents?

Enable copy-out mode without killing anything:
	purge -sC /tmp -e '\.w3\.org/'
This command will rescue all servers in the xyz.com domain. Don't get confused, if there are some doubleclick servers also in there, as they use sometimes URLs as part of their URL. After purge is done, your /tmp directory will contain at least most likely a subdirectory www.w3.org which in turn contains all files from the server Squid knows about in their respective subdirectories:
	~ $ find /tmp/www.w3.org 
	/tmp/www.w3.org
	/tmp/www.w3.org/Protocols
	/tmp/www.w3.org/Protocols/HTTP
	/tmp/www.w3.org/Protocols/HTTP/Performance
	/tmp/www.w3.org/Protocols/HTTP/Performance/Pipeline.html
	/tmp/www.w3.org/Protocols/HTTP/1.0
	/tmp/www.w3.org/Protocols/HTTP/1.0/HTTPPerformance.html
	/tmp/www.w3.org/Protocols/index.html
	/tmp/www.w3.org/Protocols/History.html
	/tmp/www.w3.org/index.html

Todo

  • Man Pages


Website space to keep this project going kindly donated by Dean Hollister (dean at odyssey dot apana dot org dot au).

Thanks to Christian Grimm (grimm at rvs dot uni-hannover dot de) &
Jens-S. Vöckler (voeckler at cs dot uchicago dot edu)
for supplying the original DFN-Cache Squid Purge project HTML page and sources, so that this project can continue.

-->