Index: wp-admin/includes/theme.php
===================================================================
--- wp-admin/includes/theme.php	(revision 24897)
+++ wp-admin/includes/theme.php	(working copy)
@@ -55,14 +55,21 @@
 	if ( is_wp_error($wp_filesystem->errors) && $wp_filesystem->errors->get_error_code() )
 		return new WP_Error('fs_error', __('Filesystem error.'), $wp_filesystem->errors);
 
-	//Get the base plugin folder
+	//Get the base theme folder
 	$themes_dir = $wp_filesystem->wp_themes_dir();
 	if ( empty($themes_dir) )
 		return new WP_Error('fs_no_themes_dir', __('Unable to locate WordPress theme directory.'));
 
 	$themes_dir = trailingslashit( $themes_dir );
-	$theme_dir = trailingslashit($themes_dir . $stylesheet);
-	$deleted = $wp_filesystem->delete($theme_dir, true);
+	$theme_dir  = trailingslashit( $themes_dir . $stylesheet );
+
+	if ( file_exists( $theme_dir . '/uninstall.php' ) ) {
+		define( 'WP_UNINSTALL_THEME', true );
+		include( $theme_dir . '/uninstall.php' );
+	}
+	do_action( 'uninstall_theme', $theme_dir );
+
+	$deleted = $wp_filesystem->delete( $theme_dir, true );
 
 	if ( ! $deleted )
 		return new WP_Error('could_not_remove_theme', sprintf(__('Could not fully remove the theme %s.'), $stylesheet) );
