Have you tried rolling back your linux OS environment $ apt-get -s install $(apt-history rollback | tr '\n' ' ') i can't promise that it will work but it's worth a shot.
this command rolls back packages after an upgrade. This won't help the OP. He deleted the wrong line from a text file and re-saved it afterwards, rolling back upgraded packages won't fix this i'm afraid.