Skip to content

Uninstallation

mocks can be uninstalled using the same package manager that was used for installation.

If you installed mocks using Homebrew, you can uninstall it with:

Terminal window
brew uninstall mocks

You can also remove the tap if you no longer need it:

Terminal window
brew untap mocks-rs/tap

If you installed mocks using Cargo, you can uninstall it with:

Terminal window
cargo uninstall mocks

If you installed mocks by downloading a binary directly:

  1. Remove the mocks binary from your system
  2. The binary is typically located in one of these directories:
    • /usr/local/bin/mocks
    • ~/.local/bin/mocks
    • Or wherever you placed it during installation
Terminal window
# Find the binary location
which mocks
# Remove the binary (adjust path as needed)
rm /usr/local/bin/mocks

After uninstallation, you can verify that mocks has been removed by running:

Terminal window
mocks --version

This command should return an error indicating that the command is not found, confirming successful uninstallation.

You can also check that the binary is no longer in your PATH:

Terminal window
which mocks

This should return no output if mocks has been successfully removed.

mocks does not create persistent configuration files, so no additional cleanup is typically required.

If you created JSON storage files for your mock APIs, these are not automatically removed during uninstallation. You may want to manually remove them if they are no longer needed:

Terminal window
# Remove your storage files (adjust paths as needed)
rm storage.json
rm *.debug.json

If you encounter issues during uninstallation:

  • Check the Troubleshooting guide
  • Create an issue on GitHub
  • Include your operating system and installation method when reporting issues