diff --git a/src/ExprNode.cc b/src/ExprNode.cc
index 5ed4aba26d7029b0c4c6d193c90ff1ae11ef3061..0aaafdbc1b03fc1b417e8312330c103b1816b8f8 100644
--- a/src/ExprNode.cc
+++ b/src/ExprNode.cc
@@ -135,15 +135,6 @@ ExprNode::collectEndogenous(set<pair<int, int>> &result) const
     result.emplace(datatree.symbol_table.getTypeSpecificID(symb_id), lag);
 }
 
-void
-ExprNode::collectExogenous(set<pair<int, int>> &result) const
-{
-  set<pair<int, int>> symb_ids_and_lags;
-  collectDynamicVariables(SymbolType::exogenous, symb_ids_and_lags);
-  for (const auto &[symb_id, lag] : symb_ids_and_lags)
-    result.emplace(datatree.symbol_table.getTypeSpecificID(symb_id), lag);
-}
-
 void
 ExprNode::computeTemporaryTerms(const pair<int, int> &derivOrder,
                                 map<pair<int, int>, temporary_terms_t> &temp_terms_map,
diff --git a/src/ExprNode.hh b/src/ExprNode.hh
index 8d88d19daff12c20e5d3d8c3d05fb71ee453a32b..518370f6a6c05c34aa6d3156d67f0173e30fa57f 100644
--- a/src/ExprNode.hh
+++ b/src/ExprNode.hh
@@ -397,14 +397,6 @@ public:
   */
   virtual void collectEndogenous(set<pair<int, int>> &result) const;
 
-  //! Computes the set of exogenous variables in the expression
-  /*!
-    Exogenous are stored as integer pairs of the form (type_specific_id, lag).
-    They are added to the set given in argument.
-    Note that model local variables are substituted by their expression in the computation.
-  */
-  virtual void collectExogenous(set<pair<int, int>> &result) const;
-
   class EvalException
   {
   };