Score:0

apt-get does not seem to be reading /var/cache/apt/archives

id flag

I am trying to upgrade Ubuntu in stages, I want to first download all the required packages and only then start the upgrade.

So, I downloaded required debian packages and copied them to /var/cache/apt/archives (before doing a dist-upgrade). But still, I see that apt tries to Get: (download) the packages.

If the cache were hit, it should have shown Hit: correct ? Is there any way to know if apt is looking for packages in some other location ? Also, is there an option to force apt to always look in the cache before trying to download?

id flag
I am not using `rsync` here. I just download the required packages on another machine and copy it to the one to be upgraded (and place them in `/var/cache/apt/archives`).
in flag
@vyom that IS the point. You are using a standard tool to copy, but anx believes the timestamps matter, so you might NEED to use rsync. I would be tempted to try using rsync, I don't know if timestamps matter.
anx avatar
fr flag
anx
There are other things that could have gone wrong.. such as missing dependencies or mismatched versions in the files you downloaded. The output with `--dry-run` might tell..
djdomi avatar
za flag
if you prefer to download why not install `apt-cacher-ng` on that machine and use it as proxy?
id flag
ok, I will try `dry-run`
br flag
Please include the output from `apt dist-upgrade` and `ls -al /var/cache/apt/archives`
id flag
Due to some environment settings, `apt` was looking under `/var/cache/apt/archives/archives`! A subdirectory under archives! I've resolved it now. Thank you all for suggestions.
anx avatar
fr flag
anx
@vyom If your problem is solved, please write an answer (not just a comment). On this site, you can and are in fact encouraged to also mark your own answers as "accepted" if they were the most useful.
br flag
FWIW, you can also use `apt -d upgrade` to perform the download only.
Score:0
id flag

Due to some environment settings, apt was looking under /var/cache/apt/archives/archives ! (a subdirectory under archives) I had to reset the environment, and then it worked. Thank you all for suggestions.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.