How to Download Only Package With Dependencies on Ubuntu 22.04

October 15, 2022 | By the+gnu+linux+evangelist.

GNU/Linux Ubuntu 22.04 Download Only Package with Dependencies for Offline Installation

[xyz-ihs snippet=”336AdTop”]

Hi! The Tutorial shows you Step-by-Step How to Download Package with Dependencies without Internet in Ubuntu 22.04 Jammy LTS GNU/Linux.

And to Download Package and All Dependencies on Ubuntu Jammy I make use of the very useful pkgdownload Script.

Especially relevant: this Script is working also in case of already installed Packages.

Because unluckily the apt and apt-get Packages Managers development is still not aware of a potential Offline Package Installation requirement.

Step-by-step pkgdownload Installation in Ubuntu 22.04 Guide - Featured
  1. 1. Launching Shell Emulator

    Open a Terminal window
    Ctrl+Alt+t on Desktop
    (Press “Enter” to Execute Commands)

    Step-by-step pkgdownload Installation in Ubuntu 22.04 Guide - Open Terminal Shell Emulator
    And Update Apt Repository:
    sudo apt update
    Authenticate with the User Admin Pass.
    If Got “User is Not in Sudoers file” then see: How to Enable sudo.
[xyz-ihs snippet=”336Ad0″] [nextpage title=”Downloading Packages”]
    [xyz-ihs snippet=”336Ad1″]
  1. 2. Downloading pkgdownload

    Download pkgdownload for Ubuntu GNU/Linux

    Get pkgdownload .sh for Ubuntu
    [xyz-ihs snippet=”234Ad1″]
    Especially relevant: Right-Click on the Raw Content and Choose “Save Page as…“!
  2. 3. Installing pkgdownload

    Then to Set up pkgdownload on Ubuntu
    First, Access the Target, usually in the Downloads folder:

    cd && cd Downloads
    To Check it’s there List the contents with:
    ls . | grep pkgdownload
    The grep Command Refine the output List showing only the entries Matching the Keyword.
    But if you are in Trouble to Find the Location on Terminal then See: How to Access Downloads Folder from Browser.
    Then give Execution Permission:
    chmod +x ./pkgdownload*
    Again set ownership to the root User with:
    sudo chown root:root ./pkgdownload*
    Finally, to Setup pkgdownload:
    sudo mv ./pkgdownload* /usr/local/bin/pkgdownload
    Authenticate with the User Admin Pass.
    If Got “User is Not in Sudoers file” then see: How to Enable sudo.
    Finally, to Test the Setup play:
    which pkgdownload
    Thanks to Wick3rman Work!
  3. 4. Downloading Packages

    Finally, to Download Package with Dependencies
    The General Form is:

    pkgdownload [MYPACKAGE]
    So for instance:
    pkgdownload broadcom-sta-dkms
    The Command take only the First, Argument, so for Multiple Packages you have to Loop it.
    And the Downloaded Packages are after automatically Compressed into a tar.gz Archive to facilitate the transfer.
[xyz-ihs snippet=”336Ad0″] [nextpage title=”Installing Packages”] [xyz-ihs snippet=”336Ad1″]
  1. 5. Installing Package

    Possibly to Install Package with Dependencies
    First, extract it into /tmp with:

    tar xvzf [MYPACK].tar.gz -/C /tmp
    Replace [MYPACK] with your current Package Name in the above.
    And then to setup it play:
    sudo dpkg -i /tmp/[MYPACK]/*.deb
  2. So Now I’m truly Happy if My Guide could Help you to Download Package with Dependencies on Ubuntu 22.04 Jammy!