You will not incur any penalties as long as you don't double bake so you can just stop running your nodes.
The key thing when shutting down is to remember that you have earned future baking rights 7 cycles in advance. So if you want to make full use of the rights and earn all of your rewards you need to leave your baker running with enough funds to cover deposits until your rights have ended. Any balance you don't need for paying deposits should be put into a KT account and delegated elsewhere as soon as possible
To stop earning further rights you just need to have less than 1 roll in staking balance (baker balance + frozen deposits + delegated balances).