The government does not know how many cases might be affected by hundreds of thousands of police records being accidentally wiped, the PM has said.
Boris Johnson told the House of Commons the police were working "round the clock" to rectify the error.
Around 400,000 fingerprint, DNA and arrest records were deleted from the police database.
Earlier, Home Secretary Priti Patel said it was not yet known whether any of the data had been permanently lost.
Speaking during Prime Minister's Questions, Mr Johnson said: "The Home Office is actively working to assess the damage and... they believe that they will be able to rectify the results of this complex incident and they hope very much that they'll be able to restore the data in question."
Asked by Labour leader Sir Keir Starmer how many convicted criminals had had their records wrongly deleted, Mr Johnson said: "We don't know how many cases might be frustrated as a result of what has happened."
He added: "Of course it is outrageous that any data should have been lost."
Last week it was revealed that the information was wiped from the Police National Computer (PNC) - which stores and shares criminal records information across the UK - after being inadvertently flagged for deletion.
The PNC is used in police investigations and provides real-time checks on people, vehicles and crimes, as well as whether suspects are wanted for any unsolved offences.
An estimated 213,000 offence records, 175,000 arrest records and 15,000 records on people were potentially incorrectly deleted as a result of a defective code.
'Criminals won't get off'
Ms Patel, who has launched an internal investigation, told ITV's Good Morning Britain that criminals would not get away with serious crimes as a result of the error.
"It is not about serious criminals getting away with anything. Multiple records are held on the same individuals on the same crimes on other profiling systems as well."
She told the BBC that officials could be instructed to re-submit the entries manually.
"I'm also clear with Home Office engineers and technicians that if we have to do manual uploads from other systems, that is effectively what we will do and that will potentially take time, but that is another option for us right now.
"We will absolutely provide updates once we know what has happened in terms of retrieving data. This will take time because it is a coding error."
The Home Office previously said that the faulty script was introduced in November 2020, but it did not run until earlier this month when the error within it immediately became apparent.