Although you cannot delete a user you can change all their details to neutral if your country has some data laws which prevent the retention of personal data. Here is how to do it.

Here is the same student’s card

You can replace all fields with XXXX for example but the User Name and Password cannot be changed.  

You should also make them Inactive and disable access

You can continue also add XXXXX to the User’s other fields i.e. addresses. 

It is not a good idea to remove teachers’ names as these appear on lessons etc., but removing their personal data is done as above.