The old post shows how to add a user to a specific group. From time to time, I need to remove a user from a specific group. So here what I summarize how to do this.
remove a user from a specific group
Here auser is the fake account to be removed from www-data group
change from auser:x:1001:www-data to auser:x:1001:
Then they will ask and notice the following messages:
Check group whether it is or not