# Remove obsolete CZML from Cesium

**URL:** <https://community.cesium.com/t/remove-obsolete-czml-from-cesium/1278>\
**Category:** CesiumJS\
**Created:** [June 17, 2014, 11:43am UTC](https://community.cesium.com/t/remove-obsolete-czml-from-cesium/1278 "2014-06-17T11:43:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![letal.vojtech](https://avatars.discourse-cdn.com/v4/letter/l/3ec8ea/32.png) [@letal.vojtech](https://community.cesium.com/u/letal.vojtech)\
**Post date:** [June 17, 2014, 11:43am UTC](https://community.cesium.com/t/remove-obsolete-czml-from-cesium/1278/1 "2014-06-17T11:43:48Z")

</div>

Hi,

we're working on realtime system which uses Cesium to show data from both simulation and real feeds. Since it is real time we have no interest in enabling someone to look back to the past, so we would like to clear obsolete CZML objects from the Cesium. By obsolete I mean that the current time is no longer within the availability interval of the object.

Is there a way to do it automatically or do I have to iterate trough objects in the scene and remove them manually?

Thanks  
Vojta

---

<div class="post-metadata">

**Author:** ![Scott\_Hunter](https://sea2.discourse-cdn.com/cesium/user_avatar/community.cesium.com/scott_hunter/32/2006_2.png) [@Scott\_Hunter](https://community.cesium.com/u/Scott_Hunter)\
**Post date:** [June 27, 2014, 6:59pm UTC](https://community.cesium.com/t/remove-obsolete-czml-from-cesium/1278/2 "2014-06-27T18:59:32Z")

</div>

In CZML, you can define a packet that will delete an entire object by ID. Here’s the pull request:

[https://github.com/AnalyticalGraphicsInc/cesium/pull/570](https://github.com/AnalyticalGraphicsInc/cesium/pull/570)

You can ignore the discussion on the request. Caleb’s initial example at the top is the working syntax.
