The city’s Department of Education will pocket $1.4 million after reaching a settlement Tuesday in a lawsuit against six former custodians who dished out no-show jobs to themselves and others at the expense of taxpayers, officials said.

The former custodial employees had bilked the DOE out of hundreds of thousands of dollars earmarked for maintenance and security between 2005 and 2011.

Trifon Radef, a former custodian at Roosevelt High School in the Bronx who is now deceased, masterminded the scheme and even used DOE money to fix his Queens home, according to the 2011 Manhattan federal court suit.

Radeef’s estate is paying the city more than $1 million as part of the settlement.

The remaining five defendants have pleaded guilty to federal fraud charges and agreed to pay $400,000 in restitution.