adding a purge function to remove orphans packages