Index: trunk/ippTools/src/remotetool.c
===================================================================
--- trunk/ippTools/src/remotetool.c	(revision 36968)
+++ trunk/ippTools/src/remotetool.c	(revision 36981)
@@ -23,4 +23,5 @@
 
 // Update
+static bool dropcomponentMode(pxConfig *config);
 static bool updaterunMode(pxConfig *config);
 static bool updatepollMode(pxConfig *config);
@@ -49,4 +50,5 @@
     MODECASE(REMOTETOOL_MODE_LISTRUN,       listrunMode);
     MODECASE(REMOTETOOL_MODE_LISTCOMPONENT, listcomponentMode);
+    MODECASE(REMOTETOOL_MODE_DROPCOMPONENT, dropcomponentMode);
     MODECASE(REMOTETOOL_MODE_UPDATERUN,     updaterunMode);
     MODECASE(REMOTETOOL_MODE_UPDATEPOLL,    updatepollMode);
@@ -314,4 +316,41 @@
 // Update
 
+static bool dropcomponentMode(pxConfig *config)
+{
+  // Assert that we have a unique component to operate on.
+  PXOPT_LOOKUP_S64(remote_id,config->args, "-remote_id",true, false);
+  psAssert(remote_id,"This must exist for this mode to be safe.");
+  PXOPT_LOOKUP_S64(stage_id, config->args, "-stage_id", true, false);
+  psAssert(stage_id,"This must exist for this mode to be safe.");
+
+  psString query = pxDataGet("remotetool_dropcomponent.sql");
+  if (!query) {
+    psError(PXTOOLS_ERR_SYS, false, "Failed to retreive SQL statement");
+    return false;
+  }
+  
+  if (!psDBTransaction(config->dbh)) {
+    psError(PS_ERR_UNKNOWN, false, "database error");
+    return false;
+  }
+
+  if (!p_psDBRunQueryF(config->dbh, query, remote_id, stage_id)) {
+    psError(PS_ERR_UNKNOWN, false, "Database error");
+    psFree(query);
+    return false;
+  }
+  psFree(query);
+  
+  
+
+  // point of no return
+  if (!psDBCommit(config->dbh)) {
+    psError(PS_ERR_UNKNOWN, false, "database error");
+    return false;
+  }
+  
+  return true;
+}
+
 static bool updaterunMode(pxConfig *config)
 {
