import re


def uninstall_alias(file_path, alias):
	"""Uninstall the given alias from the given file."""
	with open(file_path, 'r') as read_f:
		contents = read_f.read()
		if alias not in contents:
			return False
		contents = re.sub(".*"+alias+".*\n?","",contents)
		msg = '# Ossillate: pip alias to source the ossie-pip script'
		contents = re.sub(".*"+msg+".*\n?","",contents)
		out = open(file_path, 'w')
		out.write(contents)
		out.close()
		return True