apt 나 apt-get 으로 패키지를 설치하지 않고 다운로드만 받으려면 --download-only 옵션을 추가해 주면 됩니다.
sudo apt install --download-only -f vim git dkms
다운로드된 패키지는 /var/cache/apt/archives 에 저장되며 apt install 명령어로 설치할 수 있습니다.
$ sudo apt install /var/cache/apt/archives/*.deb
offline 설치일 경우 의존성을 가져오지 못해서 다음과 같은 에러가 날 수 있습니다.
The following have unmet dependecies git : Depends: liberror-perl but it is not going to be installed Depends: git-man but it is not going to be installed
의존성을 무시하고 강제로 설치해 주려면 -f 옵션을 추가해 주면 됩니다.
sudo apt install -f /var/cache/apt/archives/*.deb