When Messenger of Allah ﷺ landed at Al-Hijr during the Ghazwa of Tabuk, he ordered his companions not to drink water from its well or reserve water from it. They said, "We have already kneaded the dough with its water. and also filled our bags with its water.'' On that, the Prophet ﷺ ordered them to throw away the dough and pour out the water.
أَنَّ رَسُولَ اللَّهِ ﷺ لَمَّا نَزَلَ الْحِجْرَ فِي غَزْوَةِ تَبُوكَ أَمَرَهُمْ أَنْ لاَ يَشْرَبُوا مِنْ بِئْرِهَا وَلاَ يَسْتَقُوا مِنْهَا فَقَالُوا قَدْ عَجَنَّا مِنْهَا وَاسْتَقَيْنَا فَأَمَرَهُمْ أَنْ يَطْرَحُوا ذَلِكَ الْعَجِينَ وَيُهَرِيقُوا ذَلِكَ الْمَاءَ وَيُرْوَى عَنْ سَبْرَةَ بْنِ مَعْبَدٍ وَأَبِي الشُّمُوسِ أَنَّ النَّبِيَّ ﷺ أَمَرَ بِإِلْقَاءِ الطَّعَامِ وَقَالَ أَبُو ذَرٍّ عَنِ النَّبِيَّ ﷺ مَنِ اعْتَجَنَ بِمَائِهِ