Fixed deletion of package

Removed the package when there were no more versions present.