Modify USB profile to remove serial port - With switch (Leonardo)

Thanks for your reply, I mean adding a switch to one of the pins of the leonardo, like for exemple pin 6, if pin 6 is grounded then disable serial port.
This switch would be use if we need to reprogram the leonardo.

Thanks