Courtesy of a double assist from James Akintunde, goals in each half from Danny Lafferty and Junior Ogedi-Uzokwe avenged defeat in the midlands on the opening night of the season as Derry City left Bishopsgate with all three points on this occasion.
Bouncing back from league defeats to St Patrick's Athletic and Shamrock Rovers, Ruaidhri Higgins' Candystripes move above Dundalk to sixth place in the SSE Airtricity League Premier Division table, though having played two games more.
Longford are now 21 league games without a victory as they languish nine points adrift at the bottom.
It might have been different if Longford had got something from a lightning start which came so close to giving them the lead after just 14 seconds.
Shane Elworthy's ball over the top caught Derry square. Dean Williams scampered through to the end line on the right to pull the ball back for the in-rushing Aaron McNally whose effort was turned round a post for a corner by Nathan Gartside.
Again Derry were napping at the back two minutes later. Dylan Grimes' diagonal free-kick sailed through to Rob Manley at the far post and his shot from a tight angle wasn’t too far over the top.
Town’s press and direct approach meant Derry were labouring initially to get their passing game going and establish a foothold in the game.
And it was 16 minutes before the visitors threatened for the first time.
Junior found a pocket of space on the left to fire over a cross. The ball deflected into the path of Evan McLaughlin whose first-time drive from the edge of the area flashed wide of Lee Steacy’s left-hand post.
That led to Derry gradually growing into the game to dominate, getting their reward with a fine goal on 31 minutes.
Their front two of Junior and Akintunde dovetailed well in the build up to open up the home defence.
First Junior held the ball up to find Akintunde who had the composure and vision to pick out Lafferty arriving on the left.
And the wingback cracked a low drive with his left foot across Steacy to the far corner of the net.
With Longford chasing an equaliser before the break, Derry had some defending to do with captain Eoin Toal well positioned to clear a dangerous cross from Manley from right under his crossbar.
Having lost their way a little in the first half, Town upped their tempo on the resumption with Manley a menace to the Derry defence down the right while Aodh Dervin worked hard to drive the team on through the middle.
But Derry soon got their passing game going again and came close to doubling their lead on 58 minutes.
Town lost possession from a drop ball as again Akintunde and Junior worked the opening, setting up McLaughlin who shot narrowly wide.
Akintunde should have extended Derry’s lead on 70 minutes with a gilt-edged chance.
Junior’s persistence won the ball on the left to feed it into McLaughlin.
The teenage midfielder laid it into the path of Akintunde who delayed pulling the trigger to allow Aaron Robinson to get back and make a superb block to the shot.
Akintunde made amends, though, with his second assist of the night to seal Derry's fully deserved victory on 82 minutes.
Collecting Lafferty’s long ball, he spun to slide fellow Londoner Junior in on goal who in turn slipped the ball past Steacy.
Longford Town: Lee Steacy; Shane Elworthy (Karl Chambers 13), Aaron O’Driscoll, Joe Manley, Paddy Kirk (Aaron Dobbs 57); Aodh Dervin, Aaron Robinson (Matt O'Brien 74); Rob Manley (Callum Warfield 74), Dylan Grimes, Aaron McNally; Dean Williams.
Derry City: Nathan Gartside; Eoin Toal, Cameron McJannet, Ciaran Coll; Jack Malone, Joe Thompson; Ronan Boyce (Bastien Hery 48), Evan McLaughlin (Darren Cole 76), Danny Lafferty; James Akintunde (Jamie McGonigle 83), Junior Ogedi-Uzokwe.
Referee: John McLoughlin (Roscommon).