How to remove MacOSDefender

MacOSDefender is is potentially unwanted program for Mac that spoils browsing experience with constant redirects and advertisments. Once installed, it hijacks browser replacing default search engine/homepage/new tab with dubious search pages like http://www.alphashoppers.co/index.html. Moreover, it displays pop-up advertisments and causes redirects to shady pages preventing normal browser’s work.