Package managers certainly aren't tied to sites like GitHub; for example, I host my own Composer packages ( https://packagist.org/users/warbo/ ). Unfortunately each package does tend to get tied to a particular Web address, but there are sporadic efforts to overcome this (e.g. https://wiki.debian.org/DebTorrent )
If you consider GitHub to be a "central place for FOSS code", which represents the unfragmented community, and serves as the only neccesary search engine and update notification system, then I regret to inform you that you're mistaken. FOSS has been around far longer than GitHub, as has the Web. The community is incredibly fragmented, although pretty much all communicate via a combination of Websites, email, IRC and RSS feeds. GitHub has only ever been a rather recent fragment of this; although it would still be a great loss if all its projects were deleted overnight.
Like everything else on the Web, the current "solutions" are search and archiving on a massive scale. Perhaps P2P technologies like IPFS and magnet links will be (part of) a more scalable alternative going forward.