I get it to work finally .. The code is:
add_action( 'wp_enqueue_scripts', 'pretty_photo_styles', 100 ); function pretty_photo_styles() { if ( ! is_single() ) { wp_dequeue_script( 'pretty_photo' ); wp_dequeue_style( 'pretty_photo' ); }}
Please someone correct it if i missed anything! i tried it and it worked for me.
Thank you all.