Troubleshooting guide
How to fix the problem
Log in to another administrator account and select to remove the desired user in System Settings > Users & Groups. Before the action, make a copy of its data and decide whether to save the home folder. Deleting an active account may not be allowed; selecting delete may result in the loss of its files. Coordinate with an administrator on your organization's device.
If the problem persists
Log in as an administrator other than the user you are removing. Before confirming, save its files and clearly choose to save to the home folder; just removing the account is not safe to prepare the whole computer for sale.
Request a repair