Judge Anthony Halpin told David Darcy, of Foxfield Grove, Raheny, Dublin 5 the only other alternative was to vacate his home which was already the subject of repossession proceedings.
Father-of-two, Darcy was before Dublin District Court where he was found guilty of not complying with an enforcement order sought by the council.
In March, the court gave Darcy until June 2nd to carry out the necessary works, however, Judge Halpin said on Tuesday that he accepted Darcy had not understood he could face jail for non-compliance.
Darcy told the court Covid-19 stopped construction works but the judge remarked that the lockdown for builders was lifted in May.
Darcy also said that he lost his job and as a result of his poor credit history he could not get a loan for the work.
The case resumes in November.
Judge Halpin said if Darcy did not comply he was likely to go to prison.
He noted how the situation affected Darcy's neighbour: "if there is a fall of rain, this house is flooded".
That was due to an inadequate drainage system at Darcy's property which was not compliant with planning permission.
Darcy told the court he bought the site in early 2009 and started building. He had hired an engineer to deal with the council about drainage.
His lender went bust and did not have money to put into the house. He tried to get another bank to give him a loan.
He claimed that from 2009 until 2016, he didn't hear anything from the council.
Last November, the circuit court imposed a repossession order with a stay.
He said that he lost his job an he was on the Covid-19 assistance payment. He claimed he did not receive any correspondence telling him about Judge Halpin's order on March 3rd last to carry out the necessary work within three months.
He agreed with Judge Halpin that he was still in control of the property and the bank has not taken active possession of the house.
He also accepted his family home was not in full compliance with planning permission and that he had been previously ordered to do the work.
The court heard that flooding into the adjacent property comes to an inch or two from the threshold of their door.