I was running out of space on an Ubuntu server, so I did this command to save space
sudo rm -rf /var/cache/apt/archives
However now when trying to do things with apt, I get the following errors:
E: Could not open lock file /var/cache/apt/archives/lock - open (2 No such file or directory)
E: Unable to lock the download directory
And things like
Archive directory /var/cache/apt/archives/partial is missing.
Clearly I have removed some directory structure. Is there some way to do a apt-get rebuild-var-tree
or similar?