openpower-software-manager: Remove ubiclear

With commit 494894d69c88cf4909993227af2dd8f2ca938752,
the code to perform a factory reset (ubiclear) is now an API
call instead of a service call, so we can remove the service.

Tested: Host factory reset still works.

Change-Id: Ifb5876eee30332b2e6c0923cf315349c69c78fcc
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
diff --git a/common/recipes-phosphor/flash/openpower-software-manager.bb b/common/recipes-phosphor/flash/openpower-software-manager.bb
index 35826be..cd17e0d 100644
--- a/common/recipes-phosphor/flash/openpower-software-manager.bb
+++ b/common/recipes-phosphor/flash/openpower-software-manager.bb
@@ -52,7 +52,6 @@
         obmc-flash-bios-ubipatch.service \
         obmc-flash-bios-ubiremount.service \
         obmc-flash-bios-updatesymlinks.service \
-        obmc-flash-bios-ubiclear@.service \
         obmc-flash-bios-cleanup.service \
         obmc-flash-bios-enable-clearvolatile@.service \
         obmc-flash-bios-check-clearvolatile@.service \
diff --git a/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios b/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios
index dabd538..298a9c4 100644
--- a/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios
+++ b/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios
@@ -265,13 +265,6 @@
   fi
 }
 
-clear_ubi() {
-  mountdir="/media/${name}"
-  if is_mounted "${name}"; then
-    rm -rf $mountdir/..?* $mountdir/.[!.]* $mountdir/*
-  fi
-}
-
 ubi_cleanup() {
     # When ubi_cleanup is run, it expects one or no active version.
     activeVersion=$(busctl --list --no-pager tree \
@@ -350,10 +343,6 @@
   updatesymlinks)
     update_symlinks
     ;;
-  ubiclear)
-    name="$2"
-    clear_ubi
-    ;;
   ubicleanup)
     ubi_cleanup
     ;;
diff --git a/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiclear@.service b/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiclear@.service
deleted file mode 100644
index b84035f..0000000
--- a/common/recipes-phosphor/flash/openpower-software-manager/obmc-flash-bios-ubiclear@.service
+++ /dev/null
@@ -1,8 +0,0 @@
-[Unit]
-Description=Clear UBIFS volume %i
-
-[Service]
-Type=oneshot
-RemainAfterExit=no
-ExecStart=/usr/bin/env obmc-flash-bios ubiclear %i
-SyslogIdentifier=obmc-flash-bios