On Mon, Mar 09, 2026 at 23:52:52 -0400, [email protected] wrote: > Hello, > Recently, I went to dist-upgrade. I ended up damaging the system by > accident and decided to just do a fresh install. I saved the packages I > had downloaded for the upgrade and restored them into > /var/cache/apt/archives > > How would I get apt to recognize that the packages are there? It doesn't > seem to notice them nor does aptitude.
The packages in that directory will be used if they exactly match the names and versions that apt wants to download. hobbit:~$ ls -l /var/cache/apt/archives/ total 20 -rw-r----- 1 root root 0 Feb 17 2024 lock drwx------ 2 _apt root 4096 Mar 10 07:21 partial/ -rw-r--r-- 1 root root 13172 Aug 7 2019 sl_5.02-1+b1_amd64.deb hobbit:~$ sudo apt-get install sl jzip Reading package lists... Done Building dependency tree... Done Reading state information... Done The following packages were automatically installed and are no longer required: [...] Use 'sudo apt autoremove' to remove them. Suggested packages: zcode-game The following NEW packages will be installed: jzip sl 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. Need to get 54.4 kB/67.6 kB of archives. [...] In this example, the sl package was already in the cache, so it didn't need to be downloaded again, hence the 54.4 kB/67.6 kB. If, however, a new version of sl had been uploaded since 5.02-1+b1 then the version in the cache would have been ignored.

