remove the redundant subdirectory from the packages directory variable