A 64-year-old fugitive has walked into a Sydney police station to give himself up almost 30 years after he used a hacksaw blade and bolt cutters to escape from prison, officers said.

Darko Desic decided to go back to prison because the Australian city's Covid-19 lockdown made him jobless and homeless, media reported.

He surrendered at Dee Why Police Station at the city's fashionable northern beaches on Sunday morning and was denied bail when he appeared in court on Tuesday charged with escaping from lawful custody in 1992, a police statement said.

The charge carries a potential seven-year prison sentence.

Sydney's lockdown, which began in June, had cost Desic his cash-in-hand work as a labourer and handyman, police sources told Sydney's Daily Telegraph and Australian Broadcasting Corp.

"He slept on the beach on Saturday night and said, 'Stuff it, I'll go back to prison where there's a roof over my head'," a source told the newspaper.

Desic was 35 when he escaped from a century-old prison in Grafton, 390 miles north of Sydney, over the night of July 31-August 1 1992.

Police allege he used tools including a hacksaw blade and bolt cutters to cut through his cell window bars and a perimeter fence.

He had served 13 months of a three-and-a-half-year sentence for growing marijuana.

Born in the former Yugoslavia, Desic told police he escaped from jail because he thought he would be deported once he had served his sentence, the newspaper reported.

He feared he would be punished for failing to do his compulsory military service in his former country, which has since broken up into several nations.

It is not clear to which country he could be deported, although he is not an Australian citizen.

The newspaper said immigration officials gave up looking for him and in 2008 granted him residency in Australia.

Desic told police he had spent his entire time at large at Sydney's northern beaches in the suburb of Avalon, and according to the newspaper, had never come to the attention of police in that time.

He maintained a low profile but was once mentioned on Australia's Most Wanted, a true crime TV programme, after someone reported seeing him at Nowra, 120 miles south of Sydney.