EN
Debian / Ubuntu - get *.deb package URL using apt
7
points
In this short article, we would like to show how to get *.deb package URL using apt command (or apt-get command) under Debian / Ubuntu.
Quick solution:
apt download --print-uris package-name
Note: we can use
apt-get download --print-uris package-namealso.
Practical example
In this section we get wget URL located in used repository.
Use command:
apt download --print-uris wget
Example output:
'http://pl.archive.ubuntu.com/ubuntu/pool/main/w/wget/wget_1.21.3-1ubuntu1_amd64.deb' wget_1.21.3-1ubuntu1_amd64.deb 334280 SHA512:bed09ed02ebe8a6be4d1cb5a1c7e43a218b6e6921a078cb994ecd554abf40fc5759004aae71cfc0b00cc9d7d6912a3cfb8eebb8a9cfe791b8da7df17b192adde
Note: we can get multiple URLs at once using
apt download --print-uris wget curl htopetc.