//
you're reading...
Articles, Technology

Manually clearing SQUID cache

Here are the steps to clear the cache of Squid proxy on Ubuntu

The first step is to identify the directory where squid is caching all the files. In order to find this out open the squid.conf and search for Cache_dir

Let us assume that the Cache_dir is /var/spool/squid

Next from the Squid.conf find out who is running squid. This can be found by searching for cache_effective_user

Let us assume the user to be proxy

Stop squid using the command /etc/init.d/squid stop

Next Delete cache directory using rm -rf /var/spool/squid

Create new cache directory using mkdir /var/spool/squid

Change ownership to squid user chown proxy.proxy /var/spool/squid

Create cache again using the command squid -z

Finally start Squid using the command /etc/init.d/squid start

Note: you might to run all these commands as sudo.

Advertisements

Discussion

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: