Apple once did this to a few unsuspecting Mac users way back in the day. They released an iTunes installer that deleted the old copy of iTunes using this command:
rm -rf $2Applications/iTunes.app 2< /dev/null
$2 held the path to the drive containing the copy of iTunes to be deleted. If the name of that drive began with a space, chaos ensued....