# wp-attachments/6.1/uninstall.php

WP Attachments – Smarter File Management &amp; Download Lists, version 6.1. 19 lines.

- Page: https://pluginprobe.com/plugins/wp-attachments/6.1/code/uninstall.php
- Raw: https://pluginprobe.com/plugins/wp-attachments/6.1/raw/uninstall.php
- Modified: 2026-08-31T13:12:32+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/wp-attachments/6.1/code/uninstall.php#L10-L20`.

```php
<?php
/**
 * Uninstall routine for WP Attachments.
 *
 * Runs only when the plugin is deleted from the Plugins screen.
 * Removes all plugin data including visitor IP records.
 *
 * @package WP_Attachments
 */

// Never run this file outside of the WordPress uninstall flow.
if ( ! defined( 'WP_UNINSTALL_PLUGIN' ) ) {
	exit;
}

// Clean up IP data that was stored by the plugin.
// Keep download counters (wpa-download) and post settings (wpa_off).
delete_post_meta_by_key( 'wpa-download-control' );

```
