Search code examples
laravellaravel-valet

Does Laravel Valet have a un-park/unlink for all valet parked projects on a system?


Working on a computer with several old Laravel projects. It looks like they are all parked with Valet.

Valet is not working on new projects, I think because Valet is over extended.

Is there a way to 'mass' un-park and unlink all valet connections or do I have to uninstall and reinstall Valet?

Going through every folder individual and manually un-parking is unrealistic.


Solution

  • While Laravel Valet doesn't have a command to forget all the registered working directories, you can manually do it by editing the ~/.valet/config.json file and remove the registered directories from the paths array like the following:

    {
        "domain": "dev",
        "paths": [
            "/Users/whoami/.valet/Sites",
            "/Users/whoami/Sites/Test"
        ]
    }
    

    Alternatively, you can manually go to each of the registered Valet directories and forget them by running valet forget. However, this would be time-consuming especially when you have bulk registered directories with Valet.