Scotland's largest jail is no longer fit for purpose, according to the prisons watchdog.
An inspection of Barlinnie prison in Glasgow before the coronavirus pandemic found overcrowding could be in breach of UN human rights agreements.
The inspectorate said interim solutions must be sought before a replacement prison is opened in 2025.
The Scottish Prison Service (SPS) said the population had now reduced by 29%, as a result of the lockdown.
The inspection was carried out in September last year, six months before the coronavirus lockdown.
Reception cells in Barlinnie were first criticised by HM Inspectorate of Prisons (HMIPS) in 1995 and successive reports have continued to highlight problems there.
International inspection organisations have also condemned some of the facilities in the jail.
The European Committee for the Prevention of Torture and Inhuman or Degrading Treatment or Punishment and the Committee for the Prevention of Torture (CPT) have both severely criticised the holding cells as breaching the human rights of prisoners.
HMIPS said it was deeply concerning the holding cells, which were first condemned 25 years ago, remained in use.
The chief inspector of prisons, Wendy Sinclair-Gieben said: "The SPS is at risk of ignoring repeated advice to improve Reception.
"Both the 2003 and 2006 Inspectorate reports gave guidance in the strongest possible terms, including reference to a report in 2004 by The Committee for the Prevention of Torture.
"My report recommends that a new Reception facility should be created as I do not feel that improvement or refurbishment is either realistic or desirable."
She added: "The reality is that the ageing and fragile physical infrastructure means that the prison is no longer fit for purpose."
She highlighted overcrowding at Barlinnie which held 1,489 prisoners at the time of her inspection - more than 40% over its design capacity.
This meant significant numbers of prisoners were forced to share cells designed for single occupancy.
But she said the inspectorate was impressed with the positive and compassionate attitudes of the staff and the dynamic leadership of the management teams.
The SPS said since the beginning of the pandemic numbers had come down dramatically.
On May 25, there were 1 ,059 men in Barlinnie - a 29% reduction since the inspection took place.
A spokesman said the early release of short-term prisoners and smaller numbers being sent from the courts which are not functioning normally because of the lockdown had contributed to this.
He said 79% of the cells had now returned to single occupancy.
Glasgow City Council granted planning permission in February 2020 for a replacement for Barlinnie at Provanmill, which is hoped to be open in 2025.
The SPS said it had also developed plans to refurbish the reception area and health centre at the existing jail by 2022.