diff --git a/settings.cpp b/settings.cpp
index bf7c11d..e76694f 100644
--- a/settings.cpp
+++ b/settings.cpp
@@ -84,58 +84,4 @@
     }
 }
 
-namespace boot
-{
-
-std::tuple<Path, OneTimeEnabled> setting(const Objects& objects,
-                                         const Interface& iface)
-{
-    constexpr auto bootObjCount = 2;
-    constexpr auto oneTime = "one_time";
-    constexpr auto enabledIntf = "xyz.openbmc_project.Object.Enable";
-
-    const std::vector<Path>& paths = objects.map.at(iface);
-    auto count = paths.size();
-    if (count != bootObjCount)
-    {
-        log<level::ERR>("Exactly two objects expected",
-                        entry("INTERFACE=%s", iface.c_str()),
-                        entry("COUNT=%d", count));
-        elog<InternalFailure>();
-    }
-    size_t index = 0;
-    if (std::string::npos == paths[0].rfind(oneTime))
-    {
-        index = 1;
-    }
-    const Path& oneTimeSetting = paths[index];
-    const Path& regularSetting = paths[!index];
-
-    auto method = objects.bus.new_method_call(
-        objects.service(oneTimeSetting, iface).c_str(), oneTimeSetting.c_str(),
-        ipmi::PROP_INTF, "Get");
-    method.append(enabledIntf, "Enabled");
-
-    std::variant<bool> enabled;
-    try
-    {
-        auto reply = objects.bus.call(method);
-        reply.read(enabled);
-    }
-    catch (const std::exception& e)
-    {
-        log<level::ERR>("Error in getting Enabled property",
-                        entry("OBJECT=%s", oneTimeSetting.c_str()),
-                        entry("INTERFACE=%s", iface.c_str()),
-                        entry("ERROR=%s", e.what()));
-        elog<InternalFailure>();
-    }
-
-    auto oneTimeEnabled = std::get<bool>(enabled);
-    const Path& setting = oneTimeEnabled ? oneTimeSetting : regularSetting;
-    return std::make_tuple(setting, oneTimeEnabled);
-}
-
-} // namespace boot
-
 } // namespace settings
diff --git a/settings.hpp b/settings.hpp
index e813f06..42a8560 100644
--- a/settings.hpp
+++ b/settings.hpp
@@ -51,23 +51,4 @@
     sdbusplus::bus_t& bus;
 };
 
-namespace boot
-{
-
-using OneTimeEnabled = bool;
-
-/** @brief Return the one-time boot setting object path if enabled, otherwise
- *         the regular boot setting object path.
- *
- * @param[in] objects - const reference to an object of type Objects
- * @param[in] iface - boot setting interface
- *
- * @return A tuple - boot setting object path, a bool indicating whether the
- *                   returned path corresponds to the one time boot setting.
- */
-std::tuple<Path, OneTimeEnabled> setting(const Objects& objects,
-                                         const Interface& iface);
-
-} // namespace boot
-
 } // namespace settings
