diff --git a/IPython/html/nbextensions.py b/IPython/html/nbextensions.py
index f2fc1ed..d254b76 100644
--- a/IPython/html/nbextensions.py
+++ b/IPython/html/nbextensions.py
@@ -149,7 +149,7 @@ def install_nbextension(files, overwrite=False, symlink=False, ipython_dir=None,
if overwrite and os.path.exists(dest):
if verbose >= 1:
print("removing %s" % dest)
- if os.path.isdir(dest):
+ if os.path.isdir(dest) and not os.path.islink(dest):
shutil.rmtree(dest)
else:
os.remove(dest)