How to return to default homebrew installation of php #1850
|
This repository is great, and really useful for accessing previous version of PHP. I needed to use PHP 7 for a deprecated program, and now I want to return to the current version of PHP. Is there a way to revert the homebrew links to their original destination(like how it would normally be installed with |
Answered by
shivammathur
Jul 18, 2023
Replies: 1 comment 1 reply
|
You can install the latest php version and switch to it. brew install php
brew link --force --overwrite phpIf you get an error like php is already linked, unlink it and link it again. brew unlink php
brew link --force --overwrite phpRestart your terminal, it should now have the latest php version. If you no longer need the old PHP version like brew remove php@7.0 |
1 reply
Answer selected by
shivammathur
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can install the latest php version and switch to it.
If you get an error like php is already linked, unlink it and link it again.
Restart your terminal, it should now have the latest php version.
If you no longer need the old PHP version like
php@7.0, you can remove it