Unpublish or delete a course to remove it from the Dashboard

Courses which have graded submissions cannot be unpublished nor deleted (reference).

If your intention for unpublishing/deleting is to manage the courses on your Dashboard, you can customise your course list.

Additionally, you can choose to restrict/unrestrict students from viewing the course content (read-only) after the course ends in your course settings.