[pin] Remove the dev-package dir when a pinned package do not install properly

Fix #768