Removing pre existing menu item

I want to remove the following items from the customizer menu:

However, I already tried a few codes from other Stack questions but with no luck!

Is it even possible to remove those?

Solutions Collecting From Web of "Removing pre existing menu item"

Here you go:



After testing I found that this doesn’t work for nav_menus. You have to set a higher priority on the hook, like this:

add_action( 'customize_register', 'remove_nav_menu_section', 20 );

This gives a php warning from WP but otherwise does the job.