What should I do so that the materials are not deleted?

I downloaded the infinity grass package, I bought materials from it, it is close to 20, but when I transfer the materials to my own file, when I delete the grass package, the materials become colorless, so how do I prevent this?

You have to migrate the textures along with the materials.
The paths inside of the textures probably still point to the grass package directory.

I transfer them all, then move the materials to my own file and delete the rest, but the materials are colorless.

@jigoku

Upstairs is right, you need to move all referenced objects and delete the original material.
023-01-24 130502
2023-01-24 03161