How to remove the meta generator in wordpress?

WordPress meta generator is an automated process that generates by default, this might be dangerous sometimes if there was a security issue with the version installed and someone is targeting your website, or if you just want to remove it without a reason.

So here is how i usually remove it, open the function.php of the active theme and add this line

hope it helps.