diff --git a/install.c b/install.c
index 2619a0c..a56dbd0 100644
--- a/install.c
+++ b/install.c
@@ -159,17 +159,6 @@
     return INSTALL_SUCCESS;
 }
 
-static int
-handle_update_package(const char *path, ZipArchive *zip)
-{
-    // Update should take the rest of the progress bar.
-    ui_print("Installing update...\n");
-
-    int result = try_update_binary(path, zip);
-    register_package_root(NULL, NULL);  // Unregister package root
-    return result;
-}
-
 // Reads a file containing one or more public keys as produced by
 // DumpPublicKey:  this is an RSAPublicKey struct as it would appear
 // as a C source literal, eg:
@@ -300,6 +289,6 @@
 
     /* Verify and install the contents of the package.
      */
-    int status = handle_update_package(path, &zip);
-    return status;
+    ui_print("Installing update...\n");
+    return try_update_binary(path, &zip);
 }
diff --git a/roots.c b/roots.c
index d5754db..a510145 100644
--- a/roots.c
+++ b/roots.c
@@ -45,15 +45,10 @@
 static const char g_ramdisk[] = "@\0g_ramdisk";
 
 static RootInfo g_roots[] = {
-    { "BOOT:", g_mtd_device, NULL, "boot", NULL, g_raw },
     { "CACHE:", g_mtd_device, NULL, "cache", "/cache", "yaffs2" },
     { "DATA:", g_mtd_device, NULL, "userdata", "/data", "yaffs2" },
     { "MISC:", g_mtd_device, NULL, "misc", NULL, g_raw },
-    { "PACKAGE:", NULL, NULL, NULL, NULL, g_package_file },
-    { "RECOVERY:", g_mtd_device, NULL, "recovery", "/", g_raw },
     { "SDCARD:", "/dev/block/mmcblk0p1", "/dev/block/mmcblk0", NULL, "/sdcard", "vfat" },
-    { "SYSTEM:", g_mtd_device, NULL, "system", "/system", "yaffs2" },
-    { "MBM:", g_mtd_device, NULL, "mbm", NULL, g_raw },
     { "TMP:", NULL, NULL, NULL, "/tmp", g_ramdisk },
 };
 #define NUM_ROOTS (sizeof(g_roots) / sizeof(g_roots[0]))
@@ -85,56 +80,6 @@
     return NULL;
 }
 
-static const ZipArchive *g_package = NULL;
-static char *g_package_path = NULL;
-
-int
-register_package_root(const ZipArchive *package, const char *package_path)
-{
-    if (package != NULL) {
-        package_path = strdup(package_path);
-        if (package_path == NULL) {
-            return -1;
-        }
-        g_package_path = (char *)package_path;
-    } else {
-        free(g_package_path);
-        g_package_path = NULL;
-    }
-    g_package = package;
-    return 0;
-}
-
-int
-is_package_root_path(const char *root_path)
-{
-    const RootInfo *info = get_root_info_for_path(root_path);
-    return info != NULL && info->filesystem == g_package_file;
-}
-
-const char *
-translate_package_root_path(const char *root_path,
-        char *out_buf, size_t out_buf_len, const ZipArchive **out_package)
-{
-    const RootInfo *info = get_root_info_for_path(root_path);
-    if (info == NULL || info->filesystem != g_package_file) {
-        return NULL;
-    }
-
-    /* Strip the package root off of the path.
-     */
-    size_t root_len = strlen(info->name);
-    root_path += root_len;
-    size_t root_path_len = strlen(root_path);
-
-    if (out_buf_len < root_path_len + 1) {
-        return NULL;
-    }
-    strcpy(out_buf, root_path);
-    *out_package = g_package;
-    return out_buf;
-}
-
 /* Takes a string like "SYSTEM:lib" and turns it into a string
  * like "/system/lib".  The translated path is put in out_buf,
  * and out_buf is returned if the translation succeeded.
diff --git a/roots.h b/roots.h
index bc847ea..e85191d 100644
--- a/roots.h
+++ b/roots.h
@@ -24,14 +24,6 @@
  * components, like "SYSTEM:a/b/c".
  */
 
-/* Associate this package with the package root "PKG:".
- */
-int register_package_root(const ZipArchive *package, const char *package_path);
-
-/* Returns non-zero iff root_path points inside a package.
- */
-int is_package_root_path(const char *root_path);
-
 /* Takes a string like "SYSTEM:lib" and turns it into a string
  * like "/system/lib".  The translated path is put in out_buf,
  * and out_buf is returned if the translation succeeded.
@@ -39,12 +31,6 @@
 const char *translate_root_path(const char *root_path,
         char *out_buf, size_t out_buf_len);
 
-/* Takes a string like "PKG:lib/libc.so" and returns a pointer to
- * the containing zip file and a path like "lib/libc.so".
- */
-const char *translate_package_root_path(const char *root_path,
-        char *out_buf, size_t out_buf_len, const ZipArchive **out_package);
-
 /* Returns negative on error, positive if it's mounted, zero if it isn't.
  */
 int is_root_path_mounted(const char *root_path);
