Nehemie Tampwo is one of four 19-year-old men accused of murdering Keelan Wilson in Strathfield Walk, Wolverhampton, on May 29, 2018.
Keelan was allegedly killed amid growing tensions between Wolverhampton's V2 and V3 postcode gangs.
He was stabbed more than 30 times near his home in the Merry Hill area of the city.
Tampwo, who denies being a V3 gang member, tried to dispose of clothing containing Keelan's DNA the day after his murder.
He told Wolverhampton Crown Court he did not know who killed Keelan but would not disclose their identities, even if he did.
"I don't want to put myself and my family in danger of repercussions," he said.
Asked by Crown prosecutor Michael Duck QC about who was involved in the killing, Tampwo said: "I do not know. I would not be able to say."
Tampwo, whose nickname is Rico Montana, claims he was given the clothing by an associate to destroy as the items had been involved in a shooting. Mr Duck told jurors there was a blood pattern on the arms.
More from the trial:
Tampwo said he accepts he was "carrying the killer's clothing".
"He (the associate) wanted me to get rid of some items, clothing, some trainers," Tampwo said. "He said it was something to do with a shooting.
"The items had to be destroyed, they had residue on them.
"The day before, on Snapchat, there was something about a shooting that had happened with Keelan Wilson."
Tampwo said he found out that Keelan had died through Snapchat, while he was at a Telford address where he worked in a drug dealing operation.
"There was photos of him saying he had died," he said. "I didn't know how he died."
Tampwo, of Fern Grove, Bletchley, denies murder.
Brian Sasa, of Long Ley, Heath Town; Tyrique King, of Chelwood Gardens, Bilston; and Zenay Pennant-Phillips, whose address cannot be published, also deny murder.
The trial continues.