+ return ret;
+}
+
+static bool remove_dir(const char *service_id)
+{
+ gchar *pathname;
+ bool ret = false;
+
+ pathname = g_strdup_printf("%s/%s", STORAGEDIR, service_id);
+ if (!pathname)
+ return false;
+
+ if (!g_file_test(pathname, G_FILE_TEST_EXISTS)) {
+ ret = true;
+ } else if (g_file_test(pathname, G_FILE_TEST_IS_DIR)) {
+ rmdir(pathname);
+ ret = true;
+ }
+
+ g_free(pathname);
+ return ret;
+}
+
+bool __connman_storage_remove_service(const char *service_id)
+{
+ bool removed;
+
+ /* Remove service configuration file */
+ removed = remove_file(service_id, SETTINGS);
+ if (!removed)
+ return false;
+
+ /* Remove the statistics file also */
+ removed = remove_file(service_id, "data");
+ if (!removed)
+ return false;
+
+ removed = remove_dir(service_id);
+ if (!removed)
+ return false;
+
+ DBG("Removed service dir %s/%s", STORAGEDIR, service_id);
+
+ return true;