If you want to wipe the slate clean and remove all global installs of PHPCS and WordPress standards, you can follow these steps:
For PHPCS (PHP CodeSniffer):
- Find the Installation Directory: You can usually find where PHPCS is installed with:
which phpcs
- Remove the Binary: Once you know where it is, you can remove it with:
rm $(which phpcs)
- If Installed via Composer: If you installed PHPCS via Composer, you can use:
composer global remove squizlabs/php_codesniffer
For WordPress Coding Standards:
- Find the Installation Directory: If you don’t remember where you cloned or installed the WordPress Coding Standards, you can find it by looking in the PHPCS config file. Use:
phpcs --config-show
Look for a line mentioning installed_paths
.
- Remove the Directory: Once you’ve found the path, you can remove the directory using:
rm -r /path/to/wpcs
Replace /path/to/wpcs
with the actual path you found.
- If Installed via Composer: Similar to PHPCS, you can remove it with:
composer global remove wp-coding-standards/wpcs
These commands should remove the global installations of both PHPCS and the WordPress Coding Standards. Note that these commands can vary based on your operating system and the method you used to install these tools initially, so you might need to adjust them accordingly.