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

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.

grep -lr '//' /var/cache/nginx*

Then it will show something like this

You can safely remove by using rm

rm /var/cache/nginx/8/45/6025f6b505cd8cbc1172d4e541ac3458


Leave a Comment

Your email address will not be published. Required fields are marked *

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