diff --git a/.jenkins.d/00-deps.sh b/.jenkins.d/00-deps.sh
index 17b544a..a6c0054 100755
--- a/.jenkins.d/00-deps.sh
+++ b/.jenkins.d/00-deps.sh
@@ -7,7 +7,6 @@
     libboost-chrono-dev
     libboost-date-time-dev
     libboost-dev
-    libboost-filesystem-dev
     libboost-log-dev
     libboost-program-options-dev
     libboost-stacktrace-dev
diff --git a/.waf-tools/default-compiler-flags.py b/.waf-tools/default-compiler-flags.py
index 3e001a9..3c724fe 100644
--- a/.waf-tools/default-compiler-flags.py
+++ b/.waf-tools/default-compiler-flags.py
@@ -136,7 +136,7 @@
         return {
             'CXXFLAGS': [],
             'LINKFLAGS': [],
-            'DEFINES': ['BOOST_ASIO_NO_DEPRECATED', 'BOOST_FILESYSTEM_NO_DEPRECATED'],
+            'DEFINES': ['BOOST_ASIO_NO_DEPRECATED'],
         }
 
     def getOptimizedFlags(self, conf):
diff --git a/Dockerfile b/Dockerfile
index 5ade25a..9906703 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -8,7 +8,6 @@
         git \
         libboost-chrono-dev \
         libboost-dev \
-        libboost-filesystem-dev \
         libboost-log-dev \
         libboost-program-options-dev \
         libboost-stacktrace-dev \
diff --git a/ndn-cxx/security/pib/impl/pib-sqlite3.cpp b/ndn-cxx/security/pib/impl/pib-sqlite3.cpp
index c910d1b..cbc29a7 100644
--- a/ndn-cxx/security/pib/impl/pib-sqlite3.cpp
+++ b/ndn-cxx/security/pib/impl/pib-sqlite3.cpp
@@ -22,11 +22,10 @@
 #include "ndn-cxx/security/pib/impl/pib-sqlite3.hpp"
 #include "ndn-cxx/util/sqlite3-statement.hpp"
 
+#include <cstdlib>
+#include <filesystem>
 #include <sqlite3.h>
 
-#include <boost/filesystem/operations.hpp>
-#include <boost/filesystem/path.hpp>
-
 namespace ndn::security::pib {
 
 using ndn::util::Sqlite3Statement;
@@ -189,22 +188,22 @@
 PibSqlite3::PibSqlite3(const std::string& location)
 {
   // Determine the path of PIB DB
-  boost::filesystem::path dbDir;
+  std::filesystem::path dbDir;
   if (!location.empty()) {
-    dbDir = boost::filesystem::path(location);
+    dbDir = std::filesystem::path(location);
   }
 #ifdef NDN_CXX_WITH_TESTS
-  else if (getenv("TEST_HOME") != nullptr) {
-    dbDir = boost::filesystem::path(getenv("TEST_HOME")) / ".ndn";
+  else if (const char* testHome = std::getenv("TEST_HOME"); testHome != nullptr) {
+    dbDir = std::filesystem::path(testHome) / ".ndn";
   }
 #endif
-  else if (getenv("HOME") != nullptr) {
-    dbDir = boost::filesystem::path(getenv("HOME")) / ".ndn";
+  else if (const char* home = std::getenv("HOME"); home != nullptr) {
+    dbDir = std::filesystem::path(home) / ".ndn";
   }
   else {
-    dbDir = boost::filesystem::current_path() / ".ndn";
+    dbDir = std::filesystem::current_path() / ".ndn";
   }
-  boost::filesystem::create_directories(dbDir);
+  std::filesystem::create_directories(dbDir);
 
   // Open PIB
   int result = sqlite3_open_v2((dbDir / "pib.db").c_str(), &m_database,
@@ -217,7 +216,7 @@
                                );
 
   if (result != SQLITE_OK) {
-    NDN_THROW(PibImpl::Error("PIB database cannot be opened/created in " + dbDir.string()));
+    NDN_THROW(PibImpl::Error("PIB database cannot be opened/created in " + dbDir.native()));
   }
 
   // enable foreign key
diff --git a/ndn-cxx/security/tpm/impl/back-end-file.cpp b/ndn-cxx/security/tpm/impl/back-end-file.cpp
index 1666296..9032af3 100644
--- a/ndn-cxx/security/tpm/impl/back-end-file.cpp
+++ b/ndn-cxx/security/tpm/impl/back-end-file.cpp
@@ -30,19 +30,14 @@
 #include "ndn-cxx/security/transform/stream-sink.hpp"
 
 #include <cstdlib>
+#include <filesystem>
 #include <fstream>
-#include <sys/stat.h>
 
-#if BOOST_VERSION >= 107200
-#include <boost/filesystem/exception.hpp>
-#endif
-#include <boost/filesystem/operations.hpp>
-#include <boost/filesystem/path.hpp>
 #include <boost/lexical_cast.hpp>
 
 namespace ndn::security::tpm {
 
-namespace fs = boost::filesystem;
+namespace fs = std::filesystem;
 using ndn::security::transform::PrivateKey;
 
 class BackEndFile::Impl
@@ -55,12 +50,12 @@
       m_keystorePath = fs::path(dir);
     }
 #ifdef NDN_CXX_WITH_TESTS
-    else if (std::getenv("TEST_HOME") != nullptr) {
-      m_keystorePath = fs::path(std::getenv("TEST_HOME")) / ".ndn";
+    else if (const char* testHome = std::getenv("TEST_HOME"); testHome != nullptr) {
+      m_keystorePath = fs::path(testHome) / ".ndn";
     }
 #endif
-    else if (std::getenv("HOME") != nullptr) {
-      m_keystorePath = fs::path(std::getenv("HOME")) / ".ndn";
+    else if (const char* home = std::getenv("HOME"); home != nullptr) {
+      m_keystorePath = fs::path(home) / ".ndn";
     }
     else {
       m_keystorePath = fs::current_path() / ".ndn";
@@ -211,7 +206,7 @@
 unique_ptr<PrivateKey>
 BackEndFile::loadKey(const Name& keyName) const
 {
-  std::ifstream is(m_impl->toFileName(keyName).string());
+  std::ifstream is(m_impl->toFileName(keyName));
   auto key = make_unique<PrivateKey>();
   key->loadPkcs1Base64(is);
   return key;
@@ -220,12 +215,10 @@
 void
 BackEndFile::saveKey(const Name& keyName, const PrivateKey& key)
 {
-  std::string fileName = m_impl->toFileName(keyName).string();
+  auto fileName = m_impl->toFileName(keyName);
   std::ofstream os(fileName);
   key.savePkcs1Base64(os);
-
-  // set file permission
-  ::chmod(fileName.data(), 0000400);
+  fs::permissions(fileName, fs::perms::owner_read);
 }
 
 } // namespace ndn::security::tpm
diff --git a/ndn-cxx/security/trust-anchor-container.cpp b/ndn-cxx/security/trust-anchor-container.cpp
index 93856bf..8107fa5 100644
--- a/ndn-cxx/security/trust-anchor-container.cpp
+++ b/ndn-cxx/security/trust-anchor-container.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2023 Regents of the University of California.
+ * Copyright (c) 2013-2024 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -57,7 +57,7 @@
 }
 
 void
-TrustAnchorContainer::insert(const std::string& groupId, const boost::filesystem::path& path,
+TrustAnchorContainer::insert(const std::string& groupId, const std::filesystem::path& path,
                              time::nanoseconds refreshPeriod, bool isDir)
 {
   if (m_groups.count(groupId) != 0) {
diff --git a/ndn-cxx/security/trust-anchor-container.hpp b/ndn-cxx/security/trust-anchor-container.hpp
index 6fe208d..89771b0 100644
--- a/ndn-cxx/security/trust-anchor-container.hpp
+++ b/ndn-cxx/security/trust-anchor-container.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2023 Regents of the University of California.
+ * Copyright (c) 2013-2024 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -86,7 +86,7 @@
    * @throw Error a group with @p groupId already exists
    */
   void
-  insert(const std::string& groupId, const boost::filesystem::path& path,
+  insert(const std::string& groupId, const std::filesystem::path& path,
          time::nanoseconds refreshPeriod, bool isDir = false);
 
   /**
diff --git a/ndn-cxx/security/trust-anchor-group.cpp b/ndn-cxx/security/trust-anchor-group.cpp
index d3eaf92..c396eb5 100644
--- a/ndn-cxx/security/trust-anchor-group.cpp
+++ b/ndn-cxx/security/trust-anchor-group.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2023 Regents of the University of California.
+ * Copyright (c) 2013-2024 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -23,10 +23,6 @@
 #include "ndn-cxx/util/io.hpp"
 #include "ndn-cxx/util/logger.hpp"
 
-#if BOOST_VERSION >= 107200
-#include <boost/filesystem/directory.hpp>
-#endif
-#include <boost/filesystem/operations.hpp>
 #include <boost/range/adaptor/map.hpp>
 #include <boost/range/algorithm/copy.hpp>
 #include <boost/range/iterator_range.hpp>
@@ -35,8 +31,6 @@
 
 NDN_LOG_INIT(ndn.security.TrustAnchorGroup);
 
-namespace fs = boost::filesystem;
-
 TrustAnchorGroup::TrustAnchorGroup(CertContainerInterface& certContainer, const std::string& id)
   : m_certs(certContainer)
   , m_id(id)
@@ -84,8 +78,9 @@
 
 /////////////
 
-DynamicTrustAnchorGroup::DynamicTrustAnchorGroup(CertContainerInterface& certContainer, const std::string& id,
-                                                 const boost::filesystem::path& path,
+DynamicTrustAnchorGroup::DynamicTrustAnchorGroup(CertContainerInterface& certContainer,
+                                                 const std::string& id,
+                                                 const std::filesystem::path& path,
                                                  time::nanoseconds refreshPeriod, bool isDir)
   : TrustAnchorGroup(certContainer, id)
   , m_isDir(isDir)
@@ -112,8 +107,8 @@
 
   std::set<Name> oldAnchorNames = m_anchorNames;
 
-  auto loadCert = [this, &oldAnchorNames] (const fs::path& file) {
-    auto cert = io::load<Certificate>(file.string());
+  auto loadCert = [this, &oldAnchorNames] (const std::filesystem::path& file) {
+    auto cert = io::load<Certificate>(file);
     if (cert != nullptr) {
       if (m_anchorNames.count(cert->getName()) == 0) {
         m_anchorNames.insert(cert->getName());
@@ -128,8 +123,10 @@
   if (!m_isDir) {
     loadCert(m_path);
   }
-  else if (fs::exists(m_path)) {
-    std::for_each(fs::directory_iterator(m_path), fs::directory_iterator(), loadCert);
+  else if (std::filesystem::exists(m_path)) {
+    for (const auto& entry : std::filesystem::directory_iterator(m_path)) {
+      loadCert(entry);
+    }
   }
 
   // remove old certs
diff --git a/ndn-cxx/security/trust-anchor-group.hpp b/ndn-cxx/security/trust-anchor-group.hpp
index afd5aa2..061111d 100644
--- a/ndn-cxx/security/trust-anchor-group.hpp
+++ b/ndn-cxx/security/trust-anchor-group.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2023 Regents of the University of California.
+ * Copyright (c) 2013-2024 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -25,7 +25,7 @@
 #include "ndn-cxx/data.hpp"
 #include "ndn-cxx/security/certificate.hpp"
 
-#include <boost/filesystem/path.hpp>
+#include <filesystem>
 #include <set>
 
 namespace ndn::security {
@@ -148,7 +148,7 @@
    * @throw std::invalid_argument @p refreshPeriod is negative
    */
   DynamicTrustAnchorGroup(CertContainerInterface& certContainer, const std::string& id,
-                          const boost::filesystem::path& path, time::nanoseconds refreshPeriod,
+                          const std::filesystem::path& path, time::nanoseconds refreshPeriod,
                           bool isDir = false);
 
   void
@@ -156,7 +156,7 @@
 
 private:
   bool m_isDir;
-  boost::filesystem::path m_path;
+  std::filesystem::path m_path;
   time::nanoseconds m_refreshPeriod;
   time::steady_clock::time_point m_expireTime;
 };
diff --git a/ndn-cxx/security/validation-policy-config.cpp b/ndn-cxx/security/validation-policy-config.cpp
index 29d0a86..2222fc2 100644
--- a/ndn-cxx/security/validation-policy-config.cpp
+++ b/ndn-cxx/security/validation-policy-config.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2023 Regents of the University of California.
+ * Copyright (c) 2013-2024 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -24,11 +24,10 @@
 #include "ndn-cxx/util/io.hpp"
 
 #include <boost/algorithm/string/predicate.hpp>
-#include <boost/filesystem/operations.hpp>
-#include <boost/filesystem/path.hpp>
 #include <boost/lexical_cast.hpp>
 #include <boost/property_tree/info_parser.hpp>
 
+#include <filesystem>
 #include <fstream>
 
 namespace ndn::security::validator_config {
@@ -108,8 +107,6 @@
 ValidationPolicyConfig::processConfigTrustAnchor(const ConfigSection& configSection,
                                                  const std::string& filename)
 {
-  using namespace boost::filesystem;
-
   auto propertyIt = configSection.begin();
 
   // Get trust-anchor.type
@@ -117,6 +114,7 @@
     NDN_THROW(Error("Expecting <trust-anchor.type>"));
   }
 
+  auto baseDir = std::filesystem::absolute(filename).parent_path().lexically_normal();
   std::string type = propertyIt->second.data();
   propertyIt++;
 
@@ -133,8 +131,7 @@
     if (propertyIt != configSection.end())
       NDN_THROW(Error("Expecting end of <trust-anchor>"));
 
-    m_validator->loadAnchor(file, absolute(file, path(filename).parent_path()).string(),
-                            refresh, false);
+    m_validator->loadAnchor(file, baseDir / file, refresh, false);
   }
   else if (boost::iequals(type, "base64")) {
     // Get trust-anchor.base64-string
@@ -166,8 +163,7 @@
     if (propertyIt != configSection.end())
       NDN_THROW(Error("Expecting end of <trust-anchor>"));
 
-    path dirPath = absolute(dirString, path(filename).parent_path());
-    m_validator->loadAnchor(dirString, dirPath.string(), refresh, true);
+    m_validator->loadAnchor(dirString, baseDir / dirString, refresh, true);
   }
   else if (boost::iequals(type, "any")) {
     m_shouldBypass = true;
diff --git a/ndn-cxx/util/config-file.cpp b/ndn-cxx/util/config-file.cpp
index 53afb05..172ca71 100644
--- a/ndn-cxx/util/config-file.cpp
+++ b/ndn-cxx/util/config-file.cpp
@@ -21,8 +21,8 @@
 
 #include "ndn-cxx/util/config-file.hpp"
 
-#include <boost/filesystem/operations.hpp>
 #include <boost/property_tree/ini_parser.hpp>
+#include <cstdlib>
 
 namespace ndn {
 
@@ -40,10 +40,10 @@
   close();
 }
 
-boost::filesystem::path
+std::filesystem::path
 ConfigFile::findConfigFile()
 {
-  using namespace boost::filesystem;
+  using namespace std::filesystem;
 
 #ifdef NDN_CXX_WITH_TESTS
   if (std::getenv("TEST_HOME")) {
@@ -86,7 +86,7 @@
     return false;
   }
 
-  m_input.open(m_path.c_str());
+  m_input.open(m_path);
   if (!m_input.good() || !m_input.is_open()) {
     return false;
   }
diff --git a/ndn-cxx/util/config-file.hpp b/ndn-cxx/util/config-file.hpp
index 00750dd..cc2132c 100644
--- a/ndn-cxx/util/config-file.hpp
+++ b/ndn-cxx/util/config-file.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2021 Regents of the University of California.
+ * Copyright (c) 2013-2024 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -24,9 +24,9 @@
 
 #include "ndn-cxx/detail/common.hpp"
 
+#include <filesystem>
 #include <fstream>
 
-#include <boost/filesystem/path.hpp>
 #include <boost/property_tree/ptree.hpp>
 
 namespace ndn {
@@ -65,11 +65,17 @@
 
   ~ConfigFile();
 
-  const boost::filesystem::path&
-  getPath() const;
+  const std::filesystem::path&
+  getPath() const noexcept
+  {
+    return m_path;
+  }
 
   const Parsed&
-  getParsedConfiguration() const;
+  getParsedConfiguration() const noexcept
+  {
+    return m_config;
+  }
 
 private:
   bool
@@ -102,27 +108,15 @@
    *
    * @return path to preferred configuration (according to above order) or empty path on failure
    */
-  boost::filesystem::path
+  std::filesystem::path
   findConfigFile();
 
 private:
-  boost::filesystem::path m_path; // absolute path to active configuration file (if any)
+  std::filesystem::path m_path; // absolute path to active configuration file (if any)
   std::ifstream m_input;
   Parsed m_config;
 };
 
-inline const boost::filesystem::path&
-ConfigFile::getPath() const
-{
-  return m_path;
-}
-
-inline const ConfigFile::Parsed&
-ConfigFile::getParsedConfiguration() const
-{
-  return m_config;
-}
-
 } // namespace ndn
 
 #endif // NDN_CXX_MANAGEMENT_CONFIG_FILE_HPP
diff --git a/tests/key-chain-fixture.cpp b/tests/key-chain-fixture.cpp
index fefc7cf..9c5c17a 100644
--- a/tests/key-chain-fixture.cpp
+++ b/tests/key-chain-fixture.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2023 Regents of the University of California.
+ * Copyright (c) 2013-2024 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -23,7 +23,8 @@
 
 #include "ndn-cxx/util/io.hpp"
 
-#include <boost/filesystem/operations.hpp>
+#include <filesystem>
+#include <system_error>
 
 namespace ndn::tests {
 
@@ -36,9 +37,9 @@
 
 KeyChainFixture::~KeyChainFixture()
 {
-  boost::system::error_code ec;
+  std::error_code ec;
   for (const auto& certFile : m_certFiles) {
-    boost::filesystem::remove(certFile, ec); // ignore error
+    std::filesystem::remove(certFile, ec); // ignore error
   }
 }
 
diff --git a/tests/test-home-fixture.hpp b/tests/test-home-fixture.hpp
index 9801c92..fc82af0 100644
--- a/tests/test-home-fixture.hpp
+++ b/tests/test-home-fixture.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2023 Regents of the University of California.
+ * Copyright (c) 2013-2024 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -25,12 +25,11 @@
 #include "ndn-cxx/security/key-chain.hpp"
 
 #include <cstdlib>
+#include <filesystem>
 #include <fstream>
 #include <initializer_list>
 
 #include <boost/algorithm/string/replace.hpp>
-#include <boost/filesystem/operations.hpp>
-#include <boost/filesystem/path.hpp>
 
 namespace ndn::tests {
 
@@ -46,11 +45,11 @@
 public:
   PibDirFixture()
   {
-    if (std::getenv("NDN_CLIENT_PIB") != nullptr) {
-      m_oldPib = std::getenv("NDN_CLIENT_PIB");
+    if (const char* envPib = std::getenv("NDN_CLIENT_PIB"); envPib != nullptr) {
+      m_oldPib = envPib;
     }
-    if (std::getenv("NDN_CLIENT_TPM") != nullptr) {
-      m_oldTpm = std::getenv("NDN_CLIENT_TPM");
+    if (const char* envTpm = std::getenv("NDN_CLIENT_TPM"); envTpm != nullptr) {
+      m_oldTpm = envTpm;
     }
 
     /// @todo Consider change to an in-memory PIB/TPM
@@ -74,7 +73,7 @@
       unsetenv("NDN_CLIENT_TPM");
     }
 
-    boost::filesystem::remove_all(m_pibDir);
+    std::filesystem::remove_all(m_pibDir);
     KeyChain::resetDefaultLocators();
   }
 
@@ -106,8 +105,9 @@
   void
   createClientConf(std::initializer_list<std::string> lines) const
   {
-    boost::filesystem::create_directories(boost::filesystem::path(this->m_pibDir) / ".ndn");
-    std::ofstream of((boost::filesystem::path(this->m_pibDir) / ".ndn" / "client.conf").c_str());
+    auto ndnDir = std::filesystem::path(this->m_pibDir) / ".ndn";
+    std::filesystem::create_directories(ndnDir);
+    std::ofstream of(ndnDir / "client.conf");
     for (auto line : lines) {
       boost::replace_all(line, "%PATH%", this->m_pibDir);
       of << line << std::endl;
diff --git a/tests/tests-pch.hpp b/tests/tests-pch.hpp
index 30e0fdc..c277bcf 100644
--- a/tests/tests-pch.hpp
+++ b/tests/tests-pch.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2020 Regents of the University of California.
+ * Copyright (c) 2013-2024 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -31,7 +31,7 @@
 
 #include "tests/boost-test.hpp"
 
+#include <filesystem>
 #include <fstream>
-#include <boost/filesystem.hpp>
 
 #endif // NDN_CXX_TESTS_TESTS_PCH_HPP
diff --git a/tests/unit/security/pib/pib-impl.t.cpp b/tests/unit/security/pib/pib-impl.t.cpp
index d3d73de..7f624fd 100644
--- a/tests/unit/security/pib/pib-impl.t.cpp
+++ b/tests/unit/security/pib/pib-impl.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2023 Regents of the University of California.
+ * Copyright (c) 2013-2024 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -25,7 +25,8 @@
 #include "tests/boost-test.hpp"
 #include "tests/unit/security/pib/pib-data-fixture.hpp"
 
-#include <boost/filesystem.hpp>
+#include <filesystem>
+
 #include <boost/mp11/list.hpp>
 
 namespace ndn::tests {
@@ -46,14 +47,14 @@
 public:
   ~PibSqlite3Fixture()
   {
-    boost::filesystem::remove_all(m_path);
+    std::filesystem::remove_all(m_path);
   }
 
 private:
-  const boost::filesystem::path m_path{boost::filesystem::path(UNIT_TESTS_TMPDIR) / "TestPibImpl"};
+  const std::filesystem::path m_path{std::filesystem::path(UNIT_TESTS_TMPDIR) / "TestPibImpl"};
 
 public:
-  PibSqlite3 pib{m_path.string()};
+  PibSqlite3 pib{m_path};
 };
 
 using PibImpls = boost::mp11::mp_list<PibMemoryFixture, PibSqlite3Fixture>;
diff --git a/tests/unit/security/tpm/back-end-wrapper-file.hpp b/tests/unit/security/tpm/back-end-wrapper-file.hpp
index 6d8a663..cd25978 100644
--- a/tests/unit/security/tpm/back-end-wrapper-file.hpp
+++ b/tests/unit/security/tpm/back-end-wrapper-file.hpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2023 Regents of the University of California.
+ * Copyright (c) 2013-2024 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -24,7 +24,7 @@
 
 #include "ndn-cxx/security/tpm/impl/back-end-file.hpp"
 
-#include <boost/filesystem.hpp>
+#include <filesystem>
 
 namespace ndn::tests {
 
@@ -35,14 +35,14 @@
 {
 public:
   BackEndWrapperFile()
-    : m_tmpPath(boost::filesystem::path(UNIT_TESTS_TMPDIR) / "TpmBackEndFile")
-    , m_impl(make_unique<security::tpm::BackEndFile>(m_tmpPath.string()))
+    : m_tmpPath(std::filesystem::path(UNIT_TESTS_TMPDIR) / "TpmBackEndFile")
+    , m_impl(make_unique<security::tpm::BackEndFile>(m_tmpPath))
   {
   }
 
   ~BackEndWrapperFile()
   {
-    boost::filesystem::remove_all(m_tmpPath);
+    std::filesystem::remove_all(m_tmpPath);
   }
 
   security::tpm::BackEnd&
@@ -58,7 +58,7 @@
   }
 
 private:
-  const boost::filesystem::path m_tmpPath;
+  const std::filesystem::path m_tmpPath;
   const unique_ptr<security::tpm::BackEnd> m_impl;
 };
 
diff --git a/tests/unit/security/trust-anchor-container.t.cpp b/tests/unit/security/trust-anchor-container.t.cpp
index 246ef1c..b711ba6 100644
--- a/tests/unit/security/trust-anchor-container.t.cpp
+++ b/tests/unit/security/trust-anchor-container.t.cpp
@@ -25,8 +25,6 @@
 #include "tests/key-chain-fixture.hpp"
 #include "tests/unit/clock-fixture.hpp"
 
-#include <boost/filesystem/operations.hpp>
-
 namespace ndn::tests {
 
 using namespace ndn::security;
@@ -38,20 +36,20 @@
 public:
   TrustAnchorContainerFixture()
   {
-    boost::filesystem::create_directories(certDirPath);
+    std::filesystem::create_directories(certDirPath);
 
     identity1 = m_keyChain.createIdentity("/TestAnchorContainer/First");
     cert1 = identity1.getDefaultKey().getDefaultCertificate();
-    saveCert(cert1, certPath1.string());
+    saveCert(cert1, certPath1);
 
     identity2 = m_keyChain.createIdentity("/TestAnchorContainer/Second");
     cert2 = identity2.getDefaultKey().getDefaultCertificate();
-    saveCert(cert2, certPath2.string());
+    saveCert(cert2, certPath2);
   }
 
   ~TrustAnchorContainerFixture() override
   {
-    boost::filesystem::remove_all(certDirPath);
+    std::filesystem::remove_all(certDirPath);
   }
 
   void
@@ -73,9 +71,9 @@
   }
 
 public:
-  const boost::filesystem::path certDirPath{boost::filesystem::path(UNIT_TESTS_TMPDIR) / "test-cert-dir"};
-  const boost::filesystem::path certPath1{certDirPath / "trust-anchor-1.cert"};
-  const boost::filesystem::path certPath2{certDirPath / "trust-anchor-2.cert"};
+  const std::filesystem::path certDirPath{std::filesystem::path(UNIT_TESTS_TMPDIR) / "test-cert-dir"};
+  const std::filesystem::path certPath1{certDirPath / "trust-anchor-1.cert"};
+  const std::filesystem::path certPath2{certDirPath / "trust-anchor-2.cert"};
 
   TrustAnchorContainer anchorContainer;
 
@@ -100,20 +98,20 @@
   BOOST_CHECK_NO_THROW(anchorContainer.insert("group1", Certificate(cert1)));
   BOOST_CHECK_EQUAL(cert, anchorContainer.find(cert1.getName())); // still the same instance of the certificate
   // cannot add dynamic group when static already exists
-  BOOST_CHECK_THROW(anchorContainer.insert("group1", certPath1.string(), 1_s), TrustAnchorContainer::Error);
+  BOOST_CHECK_THROW(anchorContainer.insert("group1", certPath1, 1_s), TrustAnchorContainer::Error);
   BOOST_CHECK_EQUAL(anchorContainer.getGroup("group1").size(), 1);
   BOOST_CHECK_EQUAL(anchorContainer.size(), 1);
 
   // From file
-  anchorContainer.insert("group2", certPath2.string(), 1_s);
+  anchorContainer.insert("group2", certPath2, 1_s);
   BOOST_CHECK(anchorContainer.find(cert2.getName()) != nullptr);
   BOOST_CHECK(anchorContainer.find(identity2.getName()) != nullptr);
   BOOST_CHECK_THROW(anchorContainer.insert("group2", Certificate(cert2)), TrustAnchorContainer::Error);
-  BOOST_CHECK_THROW(anchorContainer.insert("group2", certPath2.string(), 1_s), TrustAnchorContainer::Error);
+  BOOST_CHECK_THROW(anchorContainer.insert("group2", certPath2, 1_s), TrustAnchorContainer::Error);
   BOOST_CHECK_EQUAL(anchorContainer.getGroup("group2").size(), 1);
   BOOST_CHECK_EQUAL(anchorContainer.size(), 2);
 
-  boost::filesystem::remove(certPath2);
+  std::filesystem::remove(certPath2);
   advanceClocks(1_s, 11);
 
   BOOST_CHECK(anchorContainer.find(identity2.getName()) == nullptr);
@@ -134,15 +132,15 @@
 
 BOOST_AUTO_TEST_CASE(DynamicAnchorFromDir)
 {
-  boost::filesystem::remove(certPath2);
+  std::filesystem::remove(certPath2);
 
-  anchorContainer.insert("group", certDirPath.string(), 1_s, true /* isDir */);
+  anchorContainer.insert("group", certDirPath, 1_s, /*isDir*/ true);
 
   BOOST_CHECK(anchorContainer.find(identity1.getName()) != nullptr);
   BOOST_CHECK(anchorContainer.find(identity2.getName()) == nullptr);
   BOOST_CHECK_EQUAL(anchorContainer.getGroup("group").size(), 1);
 
-  saveCert(cert2, certPath2.string());
+  saveCert(cert2, certPath2);
 
   advanceClocks(100_ms, 11);
 
@@ -150,7 +148,7 @@
   BOOST_CHECK(anchorContainer.find(identity2.getName()) != nullptr);
   BOOST_CHECK_EQUAL(anchorContainer.getGroup("group").size(), 2);
 
-  boost::filesystem::remove_all(certDirPath);
+  std::filesystem::remove_all(certDirPath);
 
   advanceClocks(100_ms, 11);
 
@@ -161,7 +159,7 @@
 
 BOOST_AUTO_TEST_CASE(FindByInterest)
 {
-  anchorContainer.insert("group1", certPath1.string(), 1_s);
+  anchorContainer.insert("group1", certPath1, 1_s);
 
   checkFindByInterest(identity1.getName(), true, cert1);
   checkFindByInterest(identity1.getName().getPrefix(-1), true, cert1);
diff --git a/tests/unit/security/validation-policy-config.t.cpp b/tests/unit/security/validation-policy-config.t.cpp
index 746ac90..34412a1 100644
--- a/tests/unit/security/validation-policy-config.t.cpp
+++ b/tests/unit/security/validation-policy-config.t.cpp
@@ -62,7 +62,7 @@
 public:
   ValidationPolicyConfigFixture()
   {
-    boost::filesystem::create_directories(path);
+    std::filesystem::create_directories(path);
     baseConfig = R"CONF(
         rule
         {
@@ -85,7 +85,7 @@
 
   ~ValidationPolicyConfigFixture()
   {
-    boost::filesystem::remove_all(path);
+    std::filesystem::remove_all(path);
   }
 
 private:
@@ -101,7 +101,7 @@
   }
 
 protected:
-  const boost::filesystem::path path{boost::filesystem::path(UNIT_TESTS_TMPDIR) / "security" / "validation-policy-config"};
+  const std::filesystem::path path{std::filesystem::path(UNIT_TESTS_TMPDIR) / "security" / "validation-policy-config"};
   std::string baseConfig;
 
   using Packet = PacketType;
@@ -115,14 +115,14 @@
   {
     BOOST_CHECK_EQUAL(this->policy.m_isConfigured, false);
 
-    this->saveIdentityCert(this->identity, (this->path / "identity.ndncert").string());
+    this->saveIdentityCert(this->identity, this->path / "identity.ndncert");
     this->policy.load(this->baseConfig + R"CONF(
         trust-anchor
         {
           type file
           file-name "trust-anchor.ndncert"
         }
-      )CONF", (this->path / "test-config").string());
+      )CONF", this->path / "test-config");
 
     BOOST_CHECK_EQUAL(this->policy.m_isConfigured, true);
     BOOST_CHECK_EQUAL(this->policy.m_shouldBypass, false);
@@ -135,7 +135,7 @@
 public:
   LoadFileWithFileAnchor()
   {
-    std::string configFile = (this->path / "config.conf").string();
+    auto configFile = this->path / "config.conf";
     {
       std::ofstream config(configFile);
       config << this->baseConfig << R"CONF(
@@ -147,7 +147,7 @@
         )CONF";
     }
 
-    this->saveIdentityCert(this->identity, (this->path / "identity.ndncert").string());
+    this->saveIdentityCert(this->identity, this->path / "identity.ndncert");
 
     BOOST_CHECK_EQUAL(this->policy.m_isConfigured, false);
 
@@ -164,7 +164,7 @@
 public:
   LoadFileWithMultipleFileAnchors()
   {
-    std::string configFile = (this->path / "config.conf").string();
+    auto configFile = this->path / "config.conf";
     {
       std::ofstream config(configFile);
       config << this->baseConfig << R"CONF(
@@ -181,7 +181,7 @@
         )CONF";
     }
 
-    this->saveIdentityCert(this->identity, (this->path / "identity.ndncert").string());
+    this->saveIdentityCert(this->identity, this->path / "identity.ndncert");
 
     BOOST_CHECK_EQUAL(this->policy.m_isConfigured, false);
 
@@ -206,11 +206,11 @@
         }
       )CONF");
 
-    this->saveIdentityCert(this->identity, (this->path / "identity.ndncert").string());
+    this->saveIdentityCert(this->identity, this->path / "identity.ndncert");
 
     BOOST_CHECK_EQUAL(this->policy.m_isConfigured, false);
 
-    this->policy.load(section, (this->path / "test-config").string());
+    this->policy.load(section, this->path / "test-config");
 
     BOOST_CHECK_EQUAL(this->policy.m_isConfigured, true);
     BOOST_CHECK_EQUAL(this->policy.m_shouldBypass, false);
@@ -238,7 +238,7 @@
           type base64
           base64-string ")CONF" + os.str() + R"CONF("
         }
-      )CONF", (this->path / "test-config").string());
+      )CONF", this->path / "test-config");
 
     BOOST_CHECK_EQUAL(this->policy.m_isConfigured, true);
     BOOST_CHECK_EQUAL(this->policy.m_shouldBypass, false);
@@ -307,8 +307,8 @@
   {
     BOOST_CHECK_EQUAL(this->policy.m_isConfigured, false);
 
-    boost::filesystem::create_directories(this->path / "keys");
-    this->saveIdentityCert(this->identity, (this->path / "keys" / "identity.ndncert").string());
+    std::filesystem::create_directories(this->path / "keys");
+    this->saveIdentityCert(this->identity, this->path / "keys" / "identity.ndncert");
 
     this->policy.load(this->baseConfig + R"CONF(
         trust-anchor
@@ -317,7 +317,7 @@
           dir keys
           )CONF" + Refresh::getRefreshString() + R"CONF(
         }
-      )CONF", (this->path / "test-config").string());
+      )CONF", this->path / "test-config");
 
     BOOST_CHECK_EQUAL(this->policy.m_isConfigured, true);
     BOOST_CHECK_EQUAL(this->policy.m_shouldBypass, false);
@@ -713,7 +713,7 @@
   using Packet = Data;
   Packet unsignedPacket("/Security/ValidatorFixture/Sub1/Sub2/Packet");
 
-  boost::filesystem::remove(this->path / "keys" / "identity.ndncert");
+  std::filesystem::remove(this->path / "keys" / "identity.ndncert");
   this->advanceClocks(Refresh::getRefreshTime(), 3);
 
   Packet packet = unsignedPacket;
diff --git a/tests/unit/security/validator-config.t.cpp b/tests/unit/security/validator-config.t.cpp
index 3cfb122..8ca4245 100644
--- a/tests/unit/security/validator-config.t.cpp
+++ b/tests/unit/security/validator-config.t.cpp
@@ -51,28 +51,27 @@
 {
 public:
   ValidatorConfigFixture()
-    : path(boost::filesystem::path(UNIT_TESTS_TMPDIR) / "security" / "validator-config")
+    : path(std::filesystem::path(UNIT_TESTS_TMPDIR) / "security" / "validator-config")
     , validator(make_unique<security::CertificateFetcherOffline>())
   {
-    boost::filesystem::create_directories(path);
+    std::filesystem::create_directories(path);
     config = R"CONF(
         trust-anchor
         {
           type any
         }
       )CONF";
-    configFile = (this->path / "config.conf").string();
-    std::ofstream f(configFile.c_str());
-    f << config;
+    configFile = path / "config.conf";
+    std::ofstream(configFile) << config;
   }
 
   ~ValidatorConfigFixture()
   {
-    boost::filesystem::remove_all(path);
+    std::filesystem::remove_all(path);
   }
 
 public:
-  const boost::filesystem::path path;
+  const std::filesystem::path path;
   std::string config;
   std::string configFile;
   ValidatorConfig validator;
diff --git a/tests/unit/util/config-file.t.cpp b/tests/unit/util/config-file.t.cpp
index ab8f212..eac5f21 100644
--- a/tests/unit/util/config-file.t.cpp
+++ b/tests/unit/util/config-file.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2023 Regents of the University of California.
+ * Copyright (c) 2013-2024 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -24,7 +24,6 @@
 #include "tests/boost-test.hpp"
 #include "tests/unit/test-home-env-saver.hpp"
 
-#include <boost/filesystem/operations.hpp>
 #include <cstdlib>
 
 namespace ndn::tests {
@@ -34,15 +33,13 @@
 
 BOOST_AUTO_TEST_CASE(Parse)
 {
-  namespace fs = boost::filesystem;
-
   setenv("TEST_HOME", "tests/unit/util/config-file-home", 1);
 
-  fs::path homePath(fs::absolute(std::getenv("TEST_HOME")));
+  auto homePath = std::filesystem::absolute(std::getenv("TEST_HOME"));
   homePath /= ".ndn/client.conf";
 
   ConfigFile config;
-  BOOST_REQUIRE_EQUAL(config.getPath(), homePath);
+  BOOST_CHECK_EQUAL(config.getPath(), homePath);
 
   const ConfigFile::Parsed& parsed = config.getParsedConfiguration();
   BOOST_CHECK_EQUAL(parsed.get<std::string>("a"), "/path/to/nowhere");
@@ -53,14 +50,14 @@
 {
   setenv("TEST_HOME", "tests/unit/util/does/not/exist", 1);
 
-  BOOST_CHECK_NO_THROW(ConfigFile config);
+  BOOST_CHECK_NO_THROW(ConfigFile{});
 }
 
 BOOST_AUTO_TEST_CASE(ParseMalformed)
 {
   setenv("TEST_HOME", "tests/unit/util/config-file-malformed-home", 1);
 
-  BOOST_CHECK_THROW(ConfigFile config, ConfigFile::Error);
+  BOOST_CHECK_THROW(ConfigFile{}, ConfigFile::Error);
 }
 
 BOOST_AUTO_TEST_SUITE_END() // TestConfigFile
diff --git a/tests/unit/util/io.t.cpp b/tests/unit/util/io.t.cpp
index 2dc303d..350abf6 100644
--- a/tests/unit/util/io.t.cpp
+++ b/tests/unit/util/io.t.cpp
@@ -24,9 +24,11 @@
 #include "tests/boost-test.hpp"
 #include "tests/key-chain-fixture.hpp"
 
-#include <boost/filesystem.hpp>
 #include <boost/mp11/list.hpp>
 
+#include <filesystem>
+#include <system_error>
+
 namespace ndn::tests {
 
 BOOST_AUTO_TEST_SUITE(Util)
@@ -100,25 +102,23 @@
 {
 protected:
   FileIoFixture()
-    : filepath(boost::filesystem::path(UNIT_TESTS_TMPDIR) / "TestIo")
-    , filename(filepath.string())
   {
-    boost::filesystem::create_directories(filepath.parent_path());
+    std::filesystem::create_directories(filename.parent_path());
   }
 
   ~FileIoFixture()
   {
-    boost::system::error_code ec;
-    boost::filesystem::remove(filepath, ec); // ignore error
+    std::error_code ec;
+    std::filesystem::remove(filename, ec); // ignore error
   }
 
   /**
-   * \brief Create a directory at `filepath`, so that it's neither readable nor writable as a file.
+   * \brief Create a directory at `filename`, so that it's neither readable nor writable as a file.
    */
   void
   mkdir() const
   {
-    boost::filesystem::create_directory(filepath);
+    std::filesystem::create_directory(filename);
   }
 
   template<typename Container>
@@ -148,8 +148,7 @@
   }
 
 protected:
-  const boost::filesystem::path filepath;
-  const std::string filename;
+  const std::filesystem::path filename{std::filesystem::path(UNIT_TESTS_TMPDIR) / "TestIo"};
 };
 
 BOOST_FIXTURE_TEST_SUITE(FileIo, FileIoFixture)
diff --git a/tests/unit/util/sqlite3-statement.t.cpp b/tests/unit/util/sqlite3-statement.t.cpp
index b3d32d5..fe114c9 100644
--- a/tests/unit/util/sqlite3-statement.t.cpp
+++ b/tests/unit/util/sqlite3-statement.t.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /*
- * Copyright (c) 2013-2023 Regents of the University of California.
+ * Copyright (c) 2013-2024 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
  *
@@ -23,8 +23,8 @@
 
 #include "tests/boost-test.hpp"
 
-#include <boost/filesystem.hpp>
 #include <cstring>
+#include <filesystem>
 #include <sqlite3.h>
 
 namespace ndn::tests {
@@ -36,9 +36,9 @@
 public:
   Sqlite3DbFixture()
   {
-    boost::filesystem::create_directories(m_path);
+    std::filesystem::create_directories(m_path);
 
-    int result = sqlite3_open_v2((m_path / "sqlite3-statement.db").string().c_str(), &db,
+    int result = sqlite3_open_v2((m_path / "sqlite3-statement.db").c_str(), &db,
                                  SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE,
 #ifdef NDN_CXX_DISABLE_SQLITE3_FS_LOCKING
                                  "unix-dotfile"
@@ -48,21 +48,21 @@
                                  );
 
     if (result != SQLITE_OK) {
-      BOOST_FAIL("Sqlite3 database cannot be opened/created: " + m_path.string());
+      BOOST_FAIL("Sqlite3 database cannot be opened/created: " + m_path.native());
     }
   }
 
   ~Sqlite3DbFixture()
   {
     sqlite3_close(db);
-    boost::filesystem::remove_all(m_path);
+    std::filesystem::remove_all(m_path);
   }
 
 protected:
   sqlite3* db = nullptr;
 
 private:
-  const boost::filesystem::path m_path{UNIT_TESTS_TMPDIR};
+  const std::filesystem::path m_path{UNIT_TESTS_TMPDIR};
 };
 
 BOOST_AUTO_TEST_SUITE(Util)
diff --git a/tools/ndnsec/main.cpp b/tools/ndnsec/main.cpp
index a9a055b..efdc526 100644
--- a/tools/ndnsec/main.cpp
+++ b/tools/ndnsec/main.cpp
@@ -26,7 +26,7 @@
 #include "ndn-cxx/version.hpp"
 
 #include <boost/exception/diagnostic_information.hpp>
-#include <boost/filesystem/path.hpp>
+#include <filesystem>
 #include <iostream>
 
 NDN_LOG_INIT(ndnsec);
@@ -54,8 +54,7 @@
 int
 main(int argc, char* argv[])
 {
-  boost::filesystem::path p(argv[0]);
-  std::string basename(p.filename().string());
+  std::string basename = std::filesystem::path(argv[0]).filename();
   std::string command;
   if (basename.rfind("ndnsec-", 0) == 0) {
     command = basename.substr(std::strlen("ndnsec-"));
diff --git a/wscript b/wscript
index 1e18344..e0fd3af 100644
--- a/wscript
+++ b/wscript
@@ -119,7 +119,7 @@
                    'For more information, see https://redmine.named-data.net/projects/nfd/wiki/Boost')
 
     # Boost.Log requires Boost.Thread
-    boost_libs = ['chrono', 'filesystem', 'log', 'thread']
+    boost_libs = ['chrono', 'log', 'thread']
 
     # Boost.Date_Time is header-only since 1.73
     if conf.env.BOOST_VERSION_NUMBER < 107300:
