Index: trunk/Nebulous/nebclient/src/nebclient.c
===================================================================
--- trunk/Nebulous/nebclient/src/nebclient.c	(revision 20227)
+++ trunk/Nebulous/nebclient/src/nebclient.c	(revision 20341)
@@ -4,5 +4,5 @@
  * Copyright (C) 2005  Joshua Hoblitt
  *
- * $Id: nebclient.c,v 1.52 2008-10-16 23:53:01 jhoblitt Exp $
+ * $Id: nebclient.c,v 1.53 2008-10-23 07:44:43 bills Exp $
  */
 
@@ -247,5 +247,5 @@
 
     locations = nebFindInstances(server, key, NULL);
-    if (!locations) {
+    if (!locations || locations->n <= 1) {
         nebSetErr(server, "can not cull - not enough instances");
 
@@ -260,4 +260,13 @@
 
     nebObjectInstancesFree(locations);
+
+    return true;
+}
+
+bool nebCullAllButOne(nebServer *server, const char *key)
+{
+    while (nebCull(server, key)) {
+        ;
+    }
 
     return true;
Index: trunk/Nebulous/nebclient/src/nebclient.h
===================================================================
--- trunk/Nebulous/nebclient/src/nebclient.h	(revision 20227)
+++ trunk/Nebulous/nebclient/src/nebclient.h	(revision 20341)
@@ -4,5 +4,5 @@
  * Copyright (C) 2005  Joshua Hoblitt
  *
- * $Id: nebclient.h,v 1.34 2008-10-16 23:53:01 jhoblitt Exp $
+ * $Id: nebclient.h,v 1.35 2008-10-23 07:44:43 bills Exp $
  */
 
@@ -120,4 +120,14 @@
 );
 
+/** Removes all but one instance from a storage object
+ *
+ * @return true on success
+ */
+
+bool nebCullAllButOne(
+    nebServer *server,                  ///< nebServer object
+    const char *key                     ///< storage object key (name)
+);
+
 /** Trys to acquire a lock on a storage object
  *
