Deleting code is the hardest. You need to have very high confidence in the quality and architecture of your application. It's definitely a super hard decision to make, and it comes with another conundrum.
If you don't remove code, there might be unintended consequences because of the additional lines of code that you are keeping and maintaining. If you decided to remove the code, unintended consequences can still ruin your day.
The confidence to delete lines of code, I think, comes from great documentation, through PR reviews and discussions, and trust in the team to do the right thing. Rare to see, but can happen! :)