Sentencing Francesco John Prevete to at least 23 years in prison, the judge at Mold Crown Court said: "you carried out a brutal and ferocious attack on Craig Maddocks.”
Prevete showed no emotion as the sentence was passed.
Mr Justice Jeremy Baker detailed the injuries inflicted by more than 50 stab wounds, causing "a significant degree of mental and physical suffering”.
He said the victim would have been “conscious of what you were doing to him.”
The judge said that there was evidence that Mr Maddocks’ use of cocaine meant that he owed people money, including £300 to Prevete's father - and that Prevete decided to punish him.
He denied murder during the trial, and Mr Justice Jeremy Baker said: “Because of your claim to have no knowledge of the offence, it may never be known with certainty what lay behind your decision to kill him."
More top news
Almost 100 firearms and ammunition have been surrendered at police stations across South Wales as part of a two-week gun amnesty.
The UK Govt has today agreed to pay £230 million -half the estimated total cost- towards electrifying the Valleys lines.
An inquest is due to be held later into the death of a 22 year old woman who died after an horrific attack at a hostel near Blackwood.