You can un-publish your course at any point of time. To un-publish a published course -
Go to Courses in admin dashboard. Select the course you want to un-publish. Go to Publish Status.

Click on Unpublish button in the course builder page. Click on confirmation popup to unpublish

Click on un-publish button and follow the steps


Note: If there are students enrolled you cannot un-publish course. You first have to disable all the students enrolled to that course and then click on unpublish again.