diff --git a/src/include/66/sanitize.h b/src/include/66/sanitize.h
index 218aa4040800b669f86ac016f82cf6de810e2093..6fb72ff490e7ef7fa3038008eb9bd90fcc5c80ac 100644
--- a/src/include/66/sanitize.h
+++ b/src/include/66/sanitize.h
@@ -28,7 +28,8 @@ extern void sanitize_livestate(resolve_service_t *res, uint32_t flag) ;
 extern void sanitize_scandir(resolve_service_t *res, uint32_t flag) ;
 extern void sanitize_init(unsigned int *alist, unsigned int alen, graph_t *g, resolve_service_t *ares, unsigned int areslen, uint32_t flags) ;
 extern void sanitize_graph(ssexec_t *info) ;
-
+extern void sanitize_write(resolve_service_t *res, uint8_t force) ;
+/*
 extern int sanitize_backup(resolve_service_t *res, uint32_t flag) ;
-
+*/
 #endif
diff --git a/src/lib66/sanitize/deps-lib/deps b/src/lib66/sanitize/deps-lib/deps
index bd6d322ac3e2baca2d8bce51e7f02951b9d1ccdf..a0fbc69448be6ab0097000023fcfc3b56b3a5701 100644
--- a/src/lib66/sanitize/deps-lib/deps
+++ b/src/lib66/sanitize/deps-lib/deps
@@ -5,6 +5,7 @@ sanitize_livestate.o
 sanitize_scandir.o
 sanitize_source.o
 sanitize_system.o
+sanitize_write.o
 -loblibs
 -lskarnet
 
diff --git a/src/lib66/sanitize/sanitize_write.c b/src/lib66/sanitize/sanitize_write.c
new file mode 100644
index 0000000000000000000000000000000000000000..8dab448676f5c68c76ef152b32946ef07d378816
--- /dev/null
+++ b/src/lib66/sanitize/sanitize_write.c
@@ -0,0 +1,121 @@
+/*
+ * sanitize_write.c
+ *
+ * Copyright (c) 2018-2021 Eric Vidal <eric@obarun.org>
+ *
+ * All rights reserved.
+ *
+ * This file is part of Obarun. It is subject to the license terms in
+ * the LICENSE file found in the top-level directory of this
+ * distribution.
+ * This file may not be copied, modified, propagated, or distributed
+ * except according to the terms contained in the LICENSE file./
+ */
+
+#include <string.h>
+#include <unistd.h>
+
+#include <oblibs/log.h>
+#include <oblibs/directory.h>
+#include <oblibs/string.h>
+#include <oblibs/types.h>
+
+#include <66/sanitize.h>
+#include <66/resolve.h>
+#include <66/constants.h>
+#include <66/enum.h>
+#include <66/tree.h>
+#include <66/state.h>
+
+static int delete(resolve_service_t *res, uint8_t force)
+{
+    int r ;
+
+    char dir[strlen(res->sa.s + res->path.servicedir) + 1] ;
+
+    auto_strings(dir, res->sa.s + res->path.servicedir) ;
+
+    r = scan_mode(dir, S_IFDIR) ;
+    if (r < 0)
+        log_die(LOG_EXIT_SYS, "unvalid source: ", dir) ;
+
+    if (r && force) {
+
+        log_trace("remove directory: ", dir) ;
+
+        if (!dir_rm_rf(dir))
+            log_dieusys(LOG_EXIT_SYS, "remove: ", dir) ;
+
+    } else if (r && !force) {
+
+        log_info("Ignoring: ", res->sa.s + res->name, " service: already written") ;
+        return 2 ;
+    }
+
+    return 1 ;
+}
+
+static void resolve_compare(resolve_service_t *res)
+{
+    resolve_service_t fres = RESOLVE_SERVICE_ZERO ;
+    resolve_wrapper_t_ref wres = resolve_set_struct(DATA_SERVICE, &fres) ;
+    ss_state_t ste = STATE_ZERO ;
+    char *name = res->sa.s + res->name ;
+
+    if (resolve_check_g(wres, res->sa.s + res->path.home, name)) {
+
+        if (!resolve_read_g(wres, res->sa.s + res->path.home, name))
+            log_dieu(LOG_EXIT_SYS, "read resolve file of: ", name) ;
+
+        if (state_check(&fres)) {
+
+            if (!state_read(&ste, &fres))
+                log_dieu(LOG_EXIT_SYS, "read state file of: ", name) ;
+
+            if (fres.type != res->type && FLAGS_ISSET(ste.issupervised, STATE_FLAGS_TRUE))
+                log_die(LOG_EXIT_SYS, "Detection of incompatible type format for supervised service: ", name, " -- current: ", get_key_by_enum(ENUM_TYPE, res->type), " previous: ", get_key_by_enum(ENUM_TYPE, fres.type), ". Please unsupervise it with '66 unsupervice ", name,"' before trying the conversion") ;
+        }
+
+        if (strcmp(res->sa.s + res->treename, fres.sa.s + fres.treename))
+            tree_service_remove(res->sa.s + res->path.home, res->sa.s + res->treename, name) ;
+    }
+
+    resolve_free(wres) ;
+}
+
+void sanitize_write(resolve_service_t *res, uint8_t force)
+{
+    /** create symlink to .resolve/ directory */
+    int r ;
+    size_t homelen = strlen(res->sa.s + res->path.servicedir) ;
+
+    resolve_compare(res) ;
+
+    if (delete(res, force) > 1)
+        return ;
+
+    char sym[homelen + SS_RESOLVE_LEN + 1] ;
+
+    auto_strings(sym, res->sa.s + res->path.servicedir) ;
+
+    r = scan_mode(sym, S_IFDIR) ;
+    if (r < 0)
+        log_die(LOG_EXIT_SYS, "unvalid source: ", sym) ;
+
+    log_trace("create directory: ", sym) ;
+    if (!dir_create_parent(sym, 0755))
+        log_dieusys(LOG_EXIT_SYS, "create directory: ", sym) ;
+
+    char dst[SS_RESOLVE_LEN + 5 + 1] ;
+
+    auto_strings(dst, "../.." SS_RESOLVE) ;
+    auto_strings(sym + homelen, SS_RESOLVE) ;
+
+    log_trace("symlink: ", sym, " to: ", dst) ;
+    r = symlink(dst, sym) ;
+    if (r < 0 && errno != EEXIST)
+        log_dieusys(LOG_EXIT_SYS, "point symlink: ", sym, " to: ", dst) ;
+
+
+}
+