Dublin 1-17 Longford 0-11
The Dubs edged closer to a return to mainstream championship action with a second-half flourish at O'Moore Park in Poertlaoise.
Prodigal son Ian Robertson grabbed the goal which turned the game in favour of Tommy Lyons' side.
Lyons was a relieved man after watching his players misfire for three quarters of an hour.
It looked anything but plain sailing at the break, with Dublin just a point to the good, having missed two glorious goal chances, including a penalty.
Dublin's slender interval lead said more about their profligacy in front of goal than it did about Longford's defending.
Misplaced passes, underhit shots and two glaring goal misses underline the problems that have dogged them this season.
Alan Brogan failed to hit the net when sent through by Darren Magee after just 12 minutes, blazing his shot high and wide when left clear one-on-one with goalkeeper Damien Sheridan after corner back Dermot Brady had lost his footing at the crucial moment.
Brogan had just brought the sides level for the fourth time when the Dubs were presented with another golden opportunity eight minutes before the break.
Ciaran Whelan, bearing down on goal, was fouled, but Tomas Quinn's penalty was brilliantly saved by Sheridan.
Quinn had already steered over three frees, but appeared to lose his confidence following that miss.
Nevertheless, Dublin did open up a two-point lead through Brogan and the lively Jason Sherlock, before Padraig Davis' fourth point narrowed the gap, Longford trailing by 0-8 to 0-7 at half-time.
Sheridan denied Quinn again with a superb save early in the second half, but there was a sense that the Dubs, with Darren Homan and Darren Magee beginning to get the better of Liam Keenan and David Hannify in midfield, were beginning to find their way.
Whelan swept over the sort of score that inspires teams after Davis had brought the sides level for the sixth time, and in the 45th minute, Sheridan was finally beaten when Senan Connell's booming delivery was flicked to the net by full forward Ian Roberstson.
Longford's challenge was spent.
Dublin began to play with fluency and confidence, and sweet scores from Sherlock, Whelan and Brogan replaced the wayward efforts that had gone before.
David Barden hit Longford's first score in almost 20 minutes, but the biggest score of the day was reserved for a point from another prodigal son, Dessie Farrell, now in the action as a late substitute.
Dublin: S Cluxton, B Cahill, P Christie, C Goggins, P Casey, B Cullen, P Griffin, D Homan, D Magee, J Sherlock (0-2), C Whelan (0-2), S Connell, A Brogan (0-4), I Robertson (1-1), T Quinn (0-6, 3 f 1 '45' . Subs: S Ryan (0-1) for Casey (40 mins), D Farrell (0-1) for Brogan (58 mins), J Magee for Homan (59 mins), R Boyle for Robertson (64 mins), N Cooper for Connell (66 mins)
Longford: D Sheridan, D Brady, C Conefrey, B Burke, M Mulleady, E Ledwith, D Reilly, L Keenan, D Hannify, A O'Connor, P Barden, T Smullen (0-2), D Barden (0-2), N Sheridan, P Davis (0-7, 5 f). Subs: S Carroll for Mulleady (12 mins), S Mulligan for Carroll (49 mins), J Kenny for O'Connor (50 mins)
Referee: M Curley (Galway)