There are a few options you can choose. Depending on how your theme is set up.
If I understand you correctly, you want to remove the page that you go to when the image is clicked, correct? If so, do you want to remove the link all together?
To remove the links to your images, you can do it a few ways. If the images are added via the post/pages manager you can navigate to the post that contains the image. Go to the post editor for the post that has the image, click on the image to bring up the edit/delete icon in the top left corner of the image. Click the icon that is next to the delete icon. You will now see some dialogue boxes. Where it says "Image Links To" click the none button and click update. Now update the post or page.
(This will remove any links to the files).
To remove the URL's that are already indexed, the easiest way is to set up a Google Webmaster Account. It's not required, but is the optimal way. What you will need to do is adjust the robots.txt file. To remove all images from being indexed you will add this to the robots.txt file:
User-agent: Googlebot-Image
Disallow: /
To block only certain image directories, you would use this or something similar:
User-agent: Googlebot-Image
Disallow: /images/
You can read more about it in the WP Hacks article found here:
http://wphacks.com/how-to-prevent-google-from-indexing-your-images/
Or from the Google Webmaster Page Here:
http://www.google.com/support/webmasters/bin/answer.py?answer=35308
To remove all attachment pages by re-directing them to the parent page, you might try this:
1) Create a new PHP file
2) Paste this line in it :
<?php wp_redirect(get_permalink($post->post_parent)); ?>
3) Save the file as "image.php"
4) Upload it into your theme folder
SOURCE:
http://wordpress.org/support/topic/disable-attachment-posts-without-remove-the-medias
Hopefully that covers what you're asking. If I'm missing your point, please clarify and I'll try again to assist you with your question.