Deleting Channels

Can you delete channels VIA code?

When no device uses a channel, it is deleted.