diff --git a/GaudiHive/src/AlgoExecutionTask.cpp b/GaudiHive/src/AlgoExecutionTask.cpp
index 31675fd21b7990258af6785176fc33ce9fb8947c..099d408cb9d0225e392f6d7d61cd4e180361dc8a 100644
--- a/GaudiHive/src/AlgoExecutionTask.cpp
+++ b/GaudiHive/src/AlgoExecutionTask.cpp
@@ -55,8 +55,10 @@ tbb::task* AlgoExecutionTask::execute()
     eventfailed = true;
   }
 
+#if defined( GAUDI_V30_DATAHANDLE_COMMIT )
   // Commit all DataHandles
   this_algo->commitHandles();
+#endif
 
   // DP it is important to propagate the failure of an event.
   // We need to stop execution when this happens so that execute run can
diff --git a/GaudiHive/src/HLTEventLoopMgr.cpp b/GaudiHive/src/HLTEventLoopMgr.cpp
index 33236b4bc87e07d6d32dc6b72c9b8bdb3c6fa272..621bffc2cdd5b21faed27a963bd01550247362f0 100644
--- a/GaudiHive/src/HLTEventLoopMgr.cpp
+++ b/GaudiHive/src/HLTEventLoopMgr.cpp
@@ -548,8 +548,10 @@ tbb::task* HLTEventLoopMgr::HLTExecutionTask::execute()
       eventfailed = true;
     }
 
+#if defined( GAUDI_V30_DATAHANDLE_COMMIT )
     // Commit all DataHandles
     this_algo->commitHandles();
+#endif
 
     // DP it is important to propagate the failure of an event.
     // We need to stop execution when this happens so that execute run can
diff --git a/GaudiHive/src/IOBoundAlgTask.cpp b/GaudiHive/src/IOBoundAlgTask.cpp
index 9cd45251dc4265eb2f79cd50450041dd9b7fc7fd..57a0df82cffd34784c0b79af45c51f954d0957a8 100644
--- a/GaudiHive/src/IOBoundAlgTask.cpp
+++ b/GaudiHive/src/IOBoundAlgTask.cpp
@@ -56,8 +56,10 @@ StatusCode IOBoundAlgTask::execute()
     eventfailed = true;
   }
 
+#if defined( GAUDI_V30_DATAHANDLE_COMMIT )
   // Commit all DataHandles
   this_algo->commitHandles();
+#endif
 
   // DP it is important to propagate the failure of an event.
   // We need to stop execution when this happens so that execute run can
diff --git a/GaudiKernel/GaudiKernel/AlgTool.h b/GaudiKernel/GaudiKernel/AlgTool.h
index ca63d399f6c17c4427cb8ddc7a4be78449d2e884..5744a9cc6cd45d97ea64d6356d04d76e5e55d898 100644
--- a/GaudiKernel/GaudiKernel/AlgTool.h
+++ b/GaudiKernel/GaudiKernel/AlgTool.h
@@ -209,7 +209,9 @@ public:
 public:
   void acceptDHVisitor( IDataHandleVisitor* ) const override;
 
+#if defined( GAUDI_V30_DATAHANDLE_COMMIT )
   void commitHandles() override;
+#endif
 
 public:
   void registerTool( IAlgTool* tool ) const
diff --git a/GaudiKernel/GaudiKernel/Algorithm.h b/GaudiKernel/GaudiKernel/Algorithm.h
index d5e7a066f2da250c35a43501fc389fdf351c7c44..cb3bd24d9e8f011263ee928dc9e0169376a5318c 100644
--- a/GaudiKernel/GaudiKernel/Algorithm.h
+++ b/GaudiKernel/GaudiKernel/Algorithm.h
@@ -439,7 +439,9 @@ public:
 public:
   void acceptDHVisitor( IDataHandleVisitor* ) const override;
 
+#if defined( GAUDI_V30_DATAHANDLE_COMMIT )
   void commitHandles() override;
+#endif
 
 public:
   void registerTool( IAlgTool* tool ) const;
diff --git a/GaudiKernel/GaudiKernel/DataHandle.h b/GaudiKernel/GaudiKernel/DataHandle.h
index 725ee3ec5790ae1b56552bc8aa73f9b30f6a20e7..05f3dd74a8520c691a8e2ad8e8867e826fb7102e 100644
--- a/GaudiKernel/GaudiKernel/DataHandle.h
+++ b/GaudiKernel/GaudiKernel/DataHandle.h
@@ -50,7 +50,14 @@ namespace Gaudi
     virtual const DataObjID& fullKey() const { return m_key; }
 
     virtual void reset( bool ){};
+
+#if defined( GAUDI_V30_DATAHANDLE_COMMIT )
+    /// This hook, is called after Algorithm::execute() by GaudiHive's algorithm
+    /// execution tasks. It was meant to allow automatically publishing data
+    /// objects to the whiteboard at the end of algorithm execution. However,
+    /// it is not used anymore, and scheduled for removal.
     virtual StatusCode commit() { return StatusCode::SUCCESS; }
+#endif
 
     virtual std::string pythonRepr() const;
     virtual bool init() { return true; }
diff --git a/GaudiKernel/GaudiKernel/IDataHandleHolder.h b/GaudiKernel/GaudiKernel/IDataHandleHolder.h
index fdb9151ca25315a4496f535939819ebd2096a17a..64e02d9fd90f8b9b25120558ec931f34ee649063 100644
--- a/GaudiKernel/GaudiKernel/IDataHandleHolder.h
+++ b/GaudiKernel/GaudiKernel/IDataHandleHolder.h
@@ -22,7 +22,9 @@ public:
 
   virtual void acceptDHVisitor( IDataHandleVisitor* ) const = 0;
 
+#if defined( GAUDI_V30_DATAHANDLE_COMMIT )
   virtual void commitHandles() = 0;
+#endif
 
   virtual const DataObjIDColl& inputDataObjs() const  = 0;
   virtual const DataObjIDColl& outputDataObjs() const = 0;
diff --git a/GaudiKernel/src/Lib/AlgTool.cpp b/GaudiKernel/src/Lib/AlgTool.cpp
index 462bea0604d137b28bc00b58582e94770d9aec1a..19733e88de98e0588c92644ee0773e9e281b0a78 100644
--- a/GaudiKernel/src/Lib/AlgTool.cpp
+++ b/GaudiKernel/src/Lib/AlgTool.cpp
@@ -516,6 +516,7 @@ void AlgTool::acceptDHVisitor( IDataHandleVisitor* vis ) const
 }
 
 //-----------------------------------------------------------------------------
+#if defined( GAUDI_V30_DATAHANDLE_COMMIT )
 void AlgTool::commitHandles()
 {
   //-----------------------------------------------------------------------------
@@ -527,3 +528,4 @@ void AlgTool::commitHandles()
     if ( at ) at->commitHandles();
   }
 }
+#endif
\ No newline at end of file
diff --git a/GaudiKernel/src/Lib/Algorithm.cpp b/GaudiKernel/src/Lib/Algorithm.cpp
index b253134873f44308371659ac028d3f7741dc79d8..087f01a68ea969b10caf9338e3e98124816b4ebc 100644
--- a/GaudiKernel/src/Lib/Algorithm.cpp
+++ b/GaudiKernel/src/Lib/Algorithm.cpp
@@ -957,6 +957,7 @@ SmartIF<IService> Algorithm::service( const std::string& name, const bool create
 }
 
 //-----------------------------------------------------------------------------
+#if defined( GAUDI_V30_DATAHANDLE_COMMIT )
 void Algorithm::commitHandles()
 {
   //-----------------------------------------------------------------------------
@@ -977,6 +978,7 @@ void Algorithm::commitHandles()
     a->commitHandles();
   }
 }
+#endif
 
 void Algorithm::registerTool( IAlgTool* tool ) const
 {
diff --git a/cmake/GaudiBuildFlags.cmake b/cmake/GaudiBuildFlags.cmake
index dbea2807bc6f5af48f9b86947d37533aa49060bd..b16f0b549b811b6a1f482893ce14339baa3794d9 100644
--- a/cmake/GaudiBuildFlags.cmake
+++ b/cmake/GaudiBuildFlags.cmake
@@ -104,6 +104,9 @@ option(G22_NEW_SVCLOCATOR
 option(GAUDI_V22
        "enable some API extensions"
        OFF)
+option(GAUDI_V30_DATAHANDLE_COMMIT
+       "enable deprecated DataHandle::commit() hook and associated code"
+       OFF)
 
 if (BINARY_TAG_COMP_NAME STREQUAL "gcc" AND BINARY_TAG_COMP_VERSION VERSION_GREATER "5.0")
   option(GAUDI_SUGGEST_OVERRIDE "enable warnings for missing override keyword" ON)