I want to delete swift package, but the delete action is disabled. So, how can I do?

I want to delete swift package, but the delete action is disabled. So, how can I do?

It is not about the Xcode 12. As you realized your folder is red. Probably you removed this folder from the target is supposed to be referenced from here..
In other words Xcode can't see this folder. That is why your delete button disabled. Just delete from target and restart the Xcode so it will be removed.
Click your project > Swift Packages and click - as below
xcodeproj (the one with the blue icon).xcodeproj, click on your project, then click on your project. You should be able to manage your packages under the "Swift Packages" section.