You will have to do that in cpanel
Login to your cPanel, and click “File Manager” icon,
Find “wp-includes” folder and click once
Look for “default-widgets.php”, select it, and click “Code Editor” on right or top
Go to line, 300, Remove this line of code:
code for wordpress
and do the same for others and save the file
or try this plugin have not tried it my self
Do not edit core code unless you really are extremely experienced. You not only risk bring your whole site down, but, even if you’re successful, your changes will be overwritten the next time you upgrade WordPress.
Far better to remove the Meta widget from the sidebar and then edit your theme’s sidebar template file to add the 2 links that you do want back in again.