How to clear nginx cache manually ?

Normally I like to do manually job.

assume that the default path of your nginx cache is /var/cache/nginx

[code lang=”shell”]
find /var/cache/nginx -type f -delete

This will clear all your cache in one line.

Delete a single file from nginx cache

If you just want to delete a single file from nginx cache, you can try this.

[code lang=”shell”]
grep -lr ‘//’ /var/cache/nginx*
Then it will show something like this

You can safely remove by using rm
[code lang=”shell”]
rm /var/cache/nginx/8/45/6025f6b505cd8cbc1172d4e541ac3458


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.