detachAll function

Detach and unload all packages