How to manage the global packages, cache, temp folders in NuGet

How to manage the global package installation folder, the package cache, and the temp folders that exist on a computer, which are used when installing, restoring, and updating packages.