Is it possible to restore the functionality of /var/lib/apt/lists and /var/apt/cache after deleting them or minmizing them in some wa
I am trying to shrink down an Ubuntu VM to the smallest size and decided to delete /var/lib/apt/lists and /var/cache/apt with the intention of restoring them when the system needs to be updated. I have done /var/cache/apt without major side effects, simply recreating some directories reenables it. The /var/lib/apt/lists is the one I am unsure of. Is it possible delete it and restore its functionality by recreating like /var/cache/apt?
Does doing that destroy the knowledge apt and dpkg have of the systems configuration or is that stored elsewhere?