Index: wp-admin/includes/class-wp-upgrader.php
===================================================================
--- wp-admin/includes/class-wp-upgrader.php	(revision 18134)
+++ wp-admin/includes/class-wp-upgrader.php	(working copy)
@@ -208,7 +208,13 @@
 			$destination = trailingslashit($destination) . trailingslashit(basename($source));
 		}
 
+		$tempdir = untrailingslashit($remote_destination) . ".tmp-" . time() . "/";
 		if ( $clear_destination ) {
+			//Try to rename original theme (also works as a backup)
+			$moved = @rename($remote_destination, $tempdir);
+			if ( ! $moved )
+				return new WP_Error('remove_old_failed', $this->strings['remove_old_failed']);
+
 			//We're going to clear the destination if theres something there
 			$this->skin->feedback('remove_old');
 			$removed = true;
@@ -259,6 +265,10 @@
 			return $res;
 		}
 
+		// Remove temporary backup
+		$removed = $wp_filesystem->delete($tempdir, true);
+		if( !$removed ) $this->skin->feedback("remove_tmp_failed");
+
 		//Bombard the calling function will all the info which we've just used.
 		return $this->result;
 	}
@@ -373,6 +383,7 @@
 		$this->strings['deactivate_plugin'] = __('Deactivating the plugin&#8230;');
 		$this->strings['remove_old'] = __('Removing the old version of the plugin&#8230;');
 		$this->strings['remove_old_failed'] = __('Could not remove the old plugin.');
+		$this->strings['remove_tmp_failed'] = __('Could not remove the temporary plugin directory.');
 		$this->strings['process_failed'] = __('Plugin update failed.');
 		$this->strings['process_success'] = __('Plugin updated successfully.');
 	}
@@ -612,6 +623,7 @@
 		$this->strings['unpack_package'] = __('Unpacking the update&#8230;');
 		$this->strings['remove_old'] = __('Removing the old version of the theme&#8230;');
 		$this->strings['remove_old_failed'] = __('Could not remove the old theme.');
+		$this->strings['remove_tmp_failed'] = __('Could not remove the temporary theme directory.');
 		$this->strings['process_failed'] = __('Theme update failed.');
 		$this->strings['process_success'] = __('Theme updated successfully.');
 	}
