# plugversions/0.2.0/uninstall.php

PlugVersions – Easily roll back to previous versions of your plugins., version 0.2.0. 18 lines.

- Page: https://pluginprobe.com/plugins/plugversions/0.2.0/code/uninstall.php
- Raw: https://pluginprobe.com/plugins/plugversions/0.2.0/raw/uninstall.php
- Modified: 2025-06-01T09:44:24+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/plugversions/0.2.0/code/uninstall.php#L10-L20`.

```php
<?php
if( !defined( 'WP_UNINSTALL_PLUGIN' ) ){
    die;
}

if( !defined( 'PLUGIN_REVISIONS_PLUGIN_DIR' ) ){
    define( 'PLUGIN_REVISIONS_PLUGIN_DIR',untrailingslashit( dirname( __FILE__ ) ) );
}

if( ! function_exists( 'eos_plugin_revisions_remove_all_versions' ) ){
    require_once  PLUGIN_REVISIONS_PLUGIN_DIR.'/plugversions.php';
}

if( function_exists( 'eos_plugin_revisions_remove_all_versions' ) ){
    eos_plugin_revisions_remove_all_versions();
}

delete_site_option( 'plugin_revisions' );
```
