By default, credit card information is removed automatically from orders with any status. But if you have created a new order status and you want the credit card information to be removed from orders with that status automatically:
In the Administration panel, go to Administration → Order statuses.
Click on the name of the status.
Tick the Remove CC info checkbox.
When an order gets a status for which the Remove CC info setting turned on, the credit card information will be removed from that order.