We need to look inside the wp_styles() object and wp_scripts() object (for js) to discover what's registered & queued. The value of the ["handle"] key will be the the name you input into the $handle var in dequeueing styles/scripts.
function discover_scripts()
{
// Registered styles
var_dump(wp_styles()->registered);
// Queued styles
var_dump(wp_styles()->queue);
// Registered scripts
var_dump(wp_scripts()->registered);
// Queued scripts
var_dump(wp_scripts()->queue);
}
add_action( 'wp_enqueue_scripts', 'discover_scripts', 100 );
Refresh any page and you'll get a long list of the object listed out with many entries that start like:
object(_WP_Dependency)#1018 (8) { ["handle"]=> string(8) "thickbox" ["src"]=> string(37) "/wp-includes/js/thickbox/thickbox.css"....
Easy search: CTRL+F "_WP_Dependency" or ["handle"] the ["handle"] value is the key that you'll pass to the dequeue script.
/**
* Dequeue JavaScript or Stylesheet.
*/
function my_dequeue_script()
{
// Run the dequeue script with the handle of the JavaScript file
wp_dequeue_script( $handle );
// Run the dequeue style with the handle of the CSS file
wp_dequeue_style( $handle );
}
add_action( 'wp_enqueue_scripts', 'my_dequeue_script', 100 );