Uninstall Laravel Valet

Uninstall Laravel Valet

  1. Blog
  2. 15 November 2026
  3. 3 min read

Stefan Bogdanescu

Founder & Senior Architect

Uninstall Laravel Valet

When you encounter persistent issues with a local development environment, the instinct is often to start fresh. However, uninstalling tools like Laravel Valet isn't as simple as running the uninstall command and moving on. In many cases, the tool remains active in your shell session or leaves behind system configurations that prevent a clean removal.

Consider a scenario where you install Valet to resolve local development needs but immediately face compatibility issues. You might find that despite having PHP 7.1 installed via php-osx.liip.ch, Valet proceeds to install PHP 7.0 through Homebrew because it fails to detect the existing version, throwing an "Unable to determine linked PHP" error. This mismatch can cause your non-Laravel projects to fail with ERR_EMPTY_RESPONSE in your browser, while Valet itself becomes unresponsive. If you then attempt to access a specific domain like laravel_from_scratch.dev, you may see a DNS address resolution failure, indicating that the underlying infrastructure isn't properly initialized or is conflicting with existing services.

In such a situation, running $ valet uninstall might return a success message, yet executing $ valet immediately afterward reveals that the tool is still active and attempting to manage your environment. This happens because the uninstall command primarily removes Valet from the path and cleans up its configuration files within the user directory, but it does not fully purge Homebrew-installed components or reverse the changes made to system-wide services like DNS servers.

To perform a true uninstallation, you must address the residual state left by the previous installation. First, ensure that the Homebrew PHP version installed by Valet is removed from your system. You can verify this by checking which versions are currently active:

brew list | grep php

If you see a PHP version corresponding to what Valet installed (e.g., php70 or similar), remove it explicitly:

brew uninstall php70

Next, check for any lingering services or port bindings. Valet often modifies DNS settings via /etc/hosts and may bind to specific ports. Review your /etc/hosts file for any entries added by Valet that are no longer needed:

grep valet /etc/hosts

Remove those lines manually if they persist after the uninstall command. Additionally, check if there are any remaining processes or sockets associated with Valet in the background. Sometimes, a clean shell restart is required to fully detach from the previous session's environment variables.

If you've installed PHP through Homebrew as part of the problematic setup, ensure that your PATH variable does not include the old PHP binary paths. You can reset your shell configuration files (like .bash_profile, .zshrc, or .profile) to remove any custom aliases or functions defined by Valet.

For a more thorough cleanup, you might need to manually inspect and clear the Homebrew cache related to Valet:

rm -rf ~/.valet
brew cleanup

This ensures that no cached assets or configuration remnants interfere with future installations. Finally, verify your current PHP installation and ensure it's the one you intend to use:

php -v

If everything checks out, your system should be free of Valet's influence. Remember, partial removals often lead to confusing behavior later, so taking these extra steps ensures a complete reset of your local development environment.

Our network