GeoffreyB
GeoffreyB

Reputation: 1839

How to clear all osm tiles cache on my own server

I'm currently working on a map project, based on OpenStreetMap, using Mapnik, renderd and mod_tile (like osm do on their website). I've built an osm tiles server, following some tutorials, on my personal computer (Ubuntu 12.04). It works well, and i've loaded a lot of regions of one country (not the entire planet, just some piece of the planet).

I realized that mod_tile was using a cache for each tiles rendered, so i decided to investigate how i can clear that. The only solution i found so far was to use the render_expired binary, but i don't understand how i can set all tiles to expired by this way (moreover without diff files)... I was trying to find where these images are located but i don't find them.

I need some help, so if someone has an idea ...

Upvotes: 8

Views: 12328

Answers (3)

user3132194
user3132194

Reputation: 2567

This helped me without restart find /var/cache/renderd/tiles/ -type f -delete .

Upvotes: 2

Ismail Yavuz
Ismail Yavuz

Reputation: 7045

Run this:

sudo rm -rf /var/lib/mod_tile/ajt
sudo service renderd restart

ajt is your tile folder which may be different and there may be more than one.

If you accidentally removed your ajt (or any other) folder itself:

sudo mkdir /var/lib/mod_tile/ajt
sudo chown renderaccount /var/lib/mod_tile/ajt

Upvotes: 4

baol
baol

Reputation: 4358

Just remove the mentioned /var/lib/mod_tile/default (using rm -rf if you dare) and restart renderd daemon.

Upvotes: 15

Related Questions