Information on deleting tracks in Sid Meier's Railroads
The key to deleting track is to make sure that no train is currently on the track and that no train uses the track for any of its routes. If any train uses a piece of track for its route, whether it is currently on that track or not, that piece of track cannot be deleted. When deleting track, you recieve the full cost of the track back, but not the cost of changing the landscape. When you sell the track in front of a depot, it also sells the depot.