diff -r 4a55b98314cd Lib/tarfile.py --- a/Lib/tarfile.py Mon Jan 12 21:03:41 2015 +0100 +++ b/Lib/tarfile.py Tue Jan 13 09:55:40 2015 +0100 @@ -2177,6 +2177,10 @@ try: # For systems that support symbolic and hard links. if tarinfo.issym(): + # a symlink with that name exists already, we need to replace + # it with our version (see #37688) + if os.path.lexists(targetpath): + os.remove(targetpath) os.symlink(tarinfo.linkname, targetpath) else: # See extract().