District Judge Barney McElholm said that a man was going to learn 'when I tell him not to do something he won't do it'.
His comments came as he remanded Caolan Hayden (30) of Fahan Street in Derry in custody on a series of charges aggravated by domestic abuse.
Hayden is charged with false imprisonment of his former partner on February 20, assault occasioning actual bodily harm, assault, threats to kill, possessing an offensive weapon.
All of the offences were said to have occurred on dates dates between February 20 and February 25.
A police officer connected the accused to the charges and opposed bail.
He told the court that police were called by a 999 call on February 25 to a report of a female assaulting a male.
When they attended they spoke to the alleged victim who told them Hayden had imprisoned her in her house since February 20.
She alleged he had struck her with a broken mop shafts and threatened her by hold a kitchen knife to her throat.
She alleged he had stuffed a white cloth into her mouth causing her to pass out.
She said on February 21 he had bitten her on the lip.
The woman also told police that Hayden had told her on February 25 to go on sunbeds to cover her bruises and when she returned he had stolen four mobile phones.
When arrested Hayden denied all the allegations and said he had gone to collect some items from the defendant's home.
He said he had seen her in the street 'going mad' and was concerned as she appeared to be intoxicated so he waited for her to come home.
Bail was opposed due to the risk of re-offending as Hayden had 46 previous convictions, two of them for domestic violence offences against a previous partner.
A police officer said that if released he believed Hayden would try and rekindle the relationship.
Defence solicitor Paddy MacDermott said that his client was 'flatly denying' all of the allegations against him.
He said that his client had been 'bail compliant' since his release on October.
Judge McElholm said that he had instructed Hayden not to enter Beraghvale and to have no contact with the alleged victim in the case.
He said these offences were said to have occurred in Beraghvale and involved the woman.
The judge said he had no faith that Hayden would abide by any conditions and these were 'very serious allegations'.
He asked that High Court should note that he believed no address in the city was suitable.
Hayden was remanded in custody to appear again on March 9.
Subscribe or register today to discover more from DonegalLive.ie
Buy the e-paper of the Donegal Democrat, Donegal People's Press, Donegal Post and Inish Times here for instant access to Donegal's premier news titles.
Keep up with the latest news from Donegal with our daily newsletter featuring the most important stories of the day delivered to your inbox every evening at 5pm.