For the purposes of this paper, Dehn surgery along a curve K in a 3-manifold M with slope σ is 'exceptional' if the resulting 3-manifold M K (σ) is reducible or a solid torus, or the core of the surgery solid torus has finite order in π 1 (M K (σ)). We show that, providing the exterior of K is irreducible and atoroidal, and the distance between a and the meridian slope is more than one, and a homology condition is satisfied, then there is (up to ambient isotopy) only a finite number of such exceptional surgery curves in a given compact orientable 3-manifold M, with ∂M a (possibly empty) union of tori. Moreover, there is a simple algorithm to find all these surgery curves, which involves inserting tangles into the 3-simplices of any given triangulation of M. As a consequence, we deduce some results about the finiteness of certain unknotting operations on knots in the 3-sphere.