Detect if packages are already installed