If apt
removed that package, it would have also removed all packages that depend on it, which is a bigger issue.
First, I'd check /var/log/apt/history.log
what actually got removed. There should be a section near the end of that file, with the date and time when you called apt, its command line and what packages were removed:
$ cat /var/log/apt/history.log
This format is a bit annoying to work with, so use:
$ sed -e 's/ ([^)]*)//g' -e 's/, / /g' /var/log/apt/history.log
This removes the version numbers and commas from the log file, for easier copy&paste.
For each of the packages listed in that block under Remove:
or Purge:
, add them to the command line of ①
# apt --print-uris install libnl-3-200
This will give you a list of URLs to download. Process this list by appending
| sed -ne "/http/s/'\([^']*\)'.*/\1/p"
to remove the quotes around the URLs and the file name and checksum, and redirect this into a file. The full command line should look similar to
# apt --print-uris install libnl-3-200 | sed -ne "/http/s/'\([^']*\)'.*/\1/p" >urls.txt
but with a bunch more packages.
Copy that file onto an USB stick, go to another machine and download these files, e.g. using wget
:
$ wget -i urls.txt
Take the USB stick back to the original machine, copy the .deb
files to /var/cache/apt/archives/
:
# cp *.deb /var/cache/apt/archives/
Then, install by running apt as before under ①, but without the --print-uris
option. It should pick up the files from the cache directory and install them.