Prison is "as bad as you could possibly imagine," according to the outgoing chief inspector of prisons in England and Wales. Nick Hardwick said things had got worse during his five year tenure, but he thought they "would have been even worse" were it not for Her Majesty's Inspectorate of Prisons.

Describing some of the conditions as "disgusting", the 58-year-old who leaves his post on 31 January, told the Guardian newspaper that prisons do not prepare people for a return to society and he criticised the locking up of children and asylum seekers.

"What a good prison does is teach you to be a good prisoner, so it teaches you to be compliant, not to use your initiative, to do what you're told, to rein in your emotions, and that isn't necessarily what you need to do to be a good citizen, or a good parent," he said.

He added that most prisoners had ended up jailed because they were not good at following rules in the first place.

Children locked up in young offenders institutions are being failed, he said, calling it "bonkers" that they were being placed in "an institution with loads [of others] just like them" after "skilled professionals" had been unable to get through to them.

"These are our children; we should be moving heaven and Earth to try to make a difference and we don't," he said, adding that they should be placed in "smaller more caring places".

Locking up asylum seekers is an abuse of power because "these people haven't been convicted of anything", he told the newspaper.

"If you lock someone up in a detention centre, you are punishing them," he said. "Whether that's your intention or not, you are. Right? Even if you're trying not to run it like a prison. Even if you have the best staff in the world, right, it's still a prison."

He said he was "not sad to leave the job" because although he was able to leave, he was "surprised about how much I don't like being in prison".

"It's as bad as you could possibly imagine and possibly more so, and don't think a little flatscreen TV in the corner is going to alleviate it, because it doesn't," he added.

Hardwick will go on to succeed Sir David Calvert-Smith as chairman of the Parole Board of England and Wales.