Delete WP-CLI from your server

If you like my WordPress work, check out my new plugin, Bylines. Thanks!

Depending on how you’ve installed WP-CLI, you may need to delete a file or an entire directory.

You can find where WP-CLI is located on your server using the which command:

$ which wp

Note, this may be a symlink, which you’d need to follow in order to find the true location of WP-CLI:

$ ls -al /usr/local/bin/wp
/usr/local/bin/wp -> /Users/danielbachhuber/salty-wordpress/wp-cli/bin/wp

Once you’ve found the location of WP-CLI, you can delete it, and the symlink if needed, with the rm command.

If you’ve installed WP-CLI as a single Phar file, you can run:

$ rm /usr/local/bin/wp

If you’ve installed WP-CLI using Git or Composer, you’ll need to delete the entire directory:

$ rm -rf /Users/danielbachhuber/salty-wordpress/wp-cli