diff --git a/utils.cc b/utils.cc
index 8fba231..ec05062 100644
--- a/utils.cc
+++ b/utils.cc
@@ -556,17 +556,6 @@
   return strerror_r(err, buf, sizeof(buf));
 }
 
-string NormalizePath(const string& path, bool strip_trailing_slash) {
-  string ret;
-  std::unique_copy(path.begin(), path.end(), std::back_inserter(ret),
-                   [](char c1, char c2) { return c1 == c2 && c1 == '/'; });
-  // The above code ensures no "//" is present in the string, so at most one
-  // '/' is present at the end of the line.
-  if (strip_trailing_slash && !ret.empty() && ret.back() == '/')
-    ret.pop_back();
-  return ret;
-}
-
 bool FileExists(const char* path) {
   struct stat stbuf;
   return 0 == lstat(path, &stbuf);
@@ -577,12 +566,6 @@
   return lstat(path, &stbuf) == 0 && S_ISLNK(stbuf.st_mode) != 0;
 }
 
-bool IsDir(const char* path) {
-  struct stat stbuf;
-  TEST_AND_RETURN_FALSE_ERRNO(lstat(path, &stbuf) == 0);
-  return S_ISDIR(stbuf.st_mode);
-}
-
 bool TryAttachingUbiVolume(int volume_num, int timeout) {
   const string volume_path = base::StringPrintf("/dev/ubi%d_0", volume_num);
   if (FileExists(volume_path.c_str())) {
diff --git a/utils.h b/utils.h
index 8f30ebd..7a506c5 100644
--- a/utils.h
+++ b/utils.h
@@ -115,10 +115,6 @@
 
 std::string ErrnoNumberAsString(int err);
 
-// Strips duplicate slashes, and optionally removes all trailing slashes.
-// Does not compact /./ or /../.
-std::string NormalizePath(const std::string& path, bool strip_trailing_slash);
-
 // Returns true if the file exists for sure. Returns false if it doesn't exist,
 // or an error occurs.
 bool FileExists(const char* path);
@@ -126,9 +122,6 @@
 // Returns true if |path| exists and is a symbolic link.
 bool IsSymlink(const char* path);
 
-// Returns true if |path| exists and is a directory.
-bool IsDir(const char* path);
-
 // Try attaching UBI |volume_num|. If there is any error executing required
 // commands to attach the volume, this function returns false. This function
 // only returns true if "/dev/ubi%d_0" becomes available in |timeout| seconds.
diff --git a/utils_unittest.cc b/utils_unittest.cc
index cd91279..2c30d30 100644
--- a/utils_unittest.cc
+++ b/utils_unittest.cc
@@ -78,38 +78,6 @@
   EXPECT_EQ("", utils::KernelDeviceOfBootDevice("/dev/ubiblock4_0"));
 }
 
-
-TEST(UtilsTest, NormalizePathTest) {
-  EXPECT_EQ("", utils::NormalizePath("", false));
-  EXPECT_EQ("", utils::NormalizePath("", true));
-  EXPECT_EQ("/", utils::NormalizePath("/", false));
-  EXPECT_EQ("", utils::NormalizePath("/", true));
-  EXPECT_EQ("/", utils::NormalizePath("//", false));
-  EXPECT_EQ("", utils::NormalizePath("//", true));
-  EXPECT_EQ("foo", utils::NormalizePath("foo", false));
-  EXPECT_EQ("foo", utils::NormalizePath("foo", true));
-  EXPECT_EQ("/foo/", utils::NormalizePath("/foo//", false));
-  EXPECT_EQ("/foo", utils::NormalizePath("/foo//", true));
-  EXPECT_EQ("bar/baz/foo/adlr", utils::NormalizePath("bar/baz//foo/adlr",
-                                                     false));
-  EXPECT_EQ("bar/baz/foo/adlr", utils::NormalizePath("bar/baz//foo/adlr",
-                                                     true));
-  EXPECT_EQ("/bar/baz/foo/adlr/", utils::NormalizePath("/bar/baz//foo/adlr/",
-                                                       false));
-  EXPECT_EQ("/bar/baz/foo/adlr", utils::NormalizePath("/bar/baz//foo/adlr/",
-                                                      true));
-  EXPECT_EQ("\\\\", utils::NormalizePath("\\\\", false));
-  EXPECT_EQ("\\\\", utils::NormalizePath("\\\\", true));
-  EXPECT_EQ("\\:/;$PATH\n\\",
-            utils::NormalizePath("\\://;$PATH\n\\", false));
-  EXPECT_EQ("\\:/;$PATH\n\\",
-            utils::NormalizePath("\\://;$PATH\n\\", true));
-  EXPECT_EQ("/spaces s/ ok/s / / /",
-            utils::NormalizePath("/spaces s/ ok/s / / /", false));
-  EXPECT_EQ("/spaces s/ ok/s / / ",
-            utils::NormalizePath("/spaces s/ ok/s / / /", true));
-}
-
 TEST(UtilsTest, ReadFileFailure) {
   chromeos::Blob empty;
   EXPECT_FALSE(utils::ReadFile("/this/doesn't/exist", &empty));
@@ -154,20 +122,6 @@
   EXPECT_TRUE(test_utils::RecursiveUnlinkDir(temp_dir));
 }
 
-TEST(UtilsTest, IsDirTest) {
-  string temp_dir;
-  EXPECT_TRUE(utils::MakeTempDirectory("isdir-test.XXXXXX", &temp_dir));
-  string temp_file = temp_dir + "/temp-file";
-  EXPECT_TRUE(utils::WriteFile(temp_file.c_str(), "", 0));
-  string temp_symlink = temp_dir + "/temp-symlink";
-  EXPECT_EQ(0, symlink(temp_dir.c_str(), temp_symlink.c_str()));
-  EXPECT_TRUE(utils::IsDir(temp_dir.c_str()));
-  EXPECT_FALSE(utils::IsDir(temp_file.c_str()));
-  EXPECT_FALSE(utils::IsDir(temp_symlink.c_str()));
-  EXPECT_FALSE(utils::IsDir("/non/existent/path"));
-  ASSERT_TRUE(test_utils::RecursiveUnlinkDir(temp_dir));
-}
-
 TEST(UtilsTest, GetDiskNameTest) {
   EXPECT_EQ("/dev/sda", utils::GetDiskName("/dev/sda3"));
   EXPECT_EQ("/dev/sdp", utils::GetDiskName("/dev/sdp1234"));
