Ubuntu – Difference between apt-get -d install & apt-get download

apt

Apt (Advanced Packaging Tool) has option to download only package by apt-get -d install [pkg-name].
I have also find apt-get download [pkg-name] to download packages.

Then what is the difference between --download-only (apt-get -d install)and download (apt-get download)?

And When should I use between them?

Best Answer

I could list following:

1) Try both without sudo, apt-get download will pass and apt-get -d install will fail (root required)

2) By default apt-get -d install will save .deb in /var/cache/apt/archives and apt-get download in current directory

3) apt-get download is newer, you wouldn't even find it in the old versions.

I hope they are helpful