A major multi-agency operation was launched on Saturday during ‘Storm Desmond’ after rising water levels came close to breaching defensive walls.
Townspeople described the water volume and intense currents generated by prolonged heavy rain in the border hills as amongst the worst for many years.
Householders in several streets were advised to lift valuable belongings to a higher level or, where available, an upper floor.
They were also urged to be prepared to leave their homes if the situation deteriorated.
Only residents in George Street, a riverside terrace near the town centre, faced evacuation.
They were advised to leave around 8 pm after fears that a crack leaking water through the river wall could lead to a breach.
Most residents went to relatives or friends homes in the town although a rest centre with hot food and drinks was available at near-by Langholm Academy.
Earlier, sandbags were distributed as concerns grew.
Local community councillors, police and Dumfries and Galloway Council workers made door-to-door calls alerting householders of the flood risk and offering support.
They focused on a riverside area also including Francis Street, William Street, Elizabeth Street, Caroline Street and Langholm Mill.
Community councillors and other volunteers joined council workers in helping carry sandbags and floodgates to homes, some belonging to senior citizens.
The council set up a ‘flood hub’ near the town centre where flood prevention equipment and advice was available.
The pedestrian suspension bridge over the river was closed for safety reasons but was reopened on Sunday.
One riverside resident said: “The river looks as high as I’ve seen it since at least 2009, the last time there was serious flooding in parts of the area.”
Firefighters from the town were also called out twice to pump water out of the cellar at the Langholm British Legion Club.
Club steward Ian Patterson said later: “The water was around four feet deep and after it was pumped out the first time started to fill up again.
“The club is around 100 yards from the river and the cellar is below the water table. The river water must have backed up through the ground.”
Mr Patterson explained that they closed slightly earlier than usual and disconnected the power supply.
He added: “We’ve had gas and electrical engineers in to check everything and brought in our own pump. Fortunately, the damage is less than we originally thought and we are back to business as usual.”
With drier weather on Sunday the level of the River Esk fell and residents returned home.
Dumfries and Galloway Council confirmed that apart from one house in Caroline Street, the town had largely escaped flood damage.
Retired secretary Isobel Nock, pictured left, who lives with her grandson Michael in George Street, opted not to leave her home during the evacuation and was relieved the the river had been held back.
She said: “There is a crack in the wall, caused by the pressure of the water. It needs urgent attention. A council engineer has had a look at it and I’m hopeful the repair work will be carried out soon.”
Another George Street resident, Ros Harris, said she had gone to a friend’s home during the evacuation.
She praised all the services for their support over the weekend and the spirit of the Langholm community for the way it ‘pulled together.’
Ros added: “We’ve been lucky in Langholm. My heart goes out to all the people in Cumbria, who have been flooded out. It’s awful.”
Also over the weekend there were trees down at Townfoot on the south side of the town and on the A7 north of Canonbie.
And a warning was issued that a landslip had closed the Langholm to Taras road.