If a student is no longer in your class, you can remove them from appearing in your roster in the Gradebook by unenrolling them. This article goes over how to do this.
Open the Gradebook menu at the top of the page, then click Students.
Select the class you want to edit the student roster for from the drop-down menu in the top-left corner.
Click the Unenroll button to the right of the student you wish to remove from this class.
Check the boxes for the warning notifications about unenrolling the student. Please note that removing them from this class will delete any assessment or attendance data for this student. Click Yes, Unenroll to remove the student.