diff --git a/src/ModelTree.cc b/src/ModelTree.cc
index 2fc143fbe55d46d9041c7ea2bf2e96094de4d967..43483486c9403301d213f62e620abb4495b603e7 100644
--- a/src/ModelTree.cc
+++ b/src/ModelTree.cc
@@ -876,18 +876,6 @@ ModelTree::equation_number() const
   return (equations.size());
 }
 
-void
-ModelTree::writeDerivative(ostream &output, int eq, int symb_id, int lag,
-                           ExprNodeOutputType output_type,
-                           const temporary_terms_t &temporary_terms) const
-{
-  if (auto it = derivatives[1].find({ eq, getDerivID(symb_id, lag) });
-      it != derivatives[1].end())
-    it->second->writeOutput(output, output_type, temporary_terms, {});
-  else
-    output << 0;
-}
-
 void
 ModelTree::computeDerivatives(int order, const set<int> &vars)
 {
diff --git a/src/ModelTree.hh b/src/ModelTree.hh
index 90513662550a2e0d2e6ef5fc9d3e24f5e6acebd9..9ca733c4048ce5013dfcddd2b96f204b430cae35 100644
--- a/src/ModelTree.hh
+++ b/src/ModelTree.hh
@@ -224,8 +224,6 @@ protected:
   void computeDerivatives(int order, const set<int> &vars);
   //! Computes derivatives of the Jacobian and Hessian w.r. to parameters
   void computeParamsDerivatives(int paramsDerivsOrder);
-  //! Write derivative of an equation w.r. to a variable
-  void writeDerivative(ostream &output, int eq, int symb_id, int lag, ExprNodeOutputType output_type, const temporary_terms_t &temporary_terms) const;
   //! Computes temporary terms (for all equations and derivatives)
   void computeTemporaryTerms(bool is_matlab, bool no_tmp_terms);
   //! Computes temporary terms per block