Back to results for “Set”
Redis › Geospatial Data in Redis

How do you remove a specific location from a Redis geospatial dataset once it is no longer needed?

Intermediate

Answer

Since geospatial data is stored internally as a sorted set, you simply use the standard ZREM command with the dataset key and the member name you want to remove, deleting that specific location entry while leaving the rest of the dataset completely intact.
ZREM locations 'old_delivery_point'
Real-world example A delivery tracking system removes a completed delivery's location marker from its geospatial dataset using ZREM, keeping the dataset focused only on currently active deliveries.

Common follow-ups: Does removing a geospatial member require any special geo specific command?;How do you remove all locations within a specific area at once?