To remove the Yahoo Search redirect virus from Safari, go to preferences, change your default search engine, remove any suspicious extensions, and reset your browser data. If nothing helps, look for suspicious apps on your Mac and remove them. You can also get a reliable antivirus for Mac, such as TotalAV, and perform a full scan.