I'm a new to Ubuntu (and linux). So far, my experience with Ubuntu is great. The boot speed is amazingly fast compared to Windows.
Anyway, how do I download packages for offline use with their dependencies for Ubuntu 15.10? I have tried searching, however, the results are from few years ago. I'm not sure if the methods are still valid or if there are better options now in 15.10.
Edit
After browsing the answers on here: How can I install software or packages without Internet (offline)? , I found this code the most useful.
sudo apt-get install PACKAGE --print-uris -qq | sed -n "s/'\([^ ]\+\)' \([^ ]\+\) \([^ ]\+\) MD5Sum:\([^ ]\+\)/wget -c \1/p" > install.sh
Anyway, here are some instructions for complete newbies. I hope that you will find them useful.
Complete download instructions for others new to Ubuntu 15.10+:
- Open the Terminal (shortcut CTRL + ALT +T)
- Navigate to the folder that you would like the package to be downloaded to by using the command:
cd FOLDERNAME
(Example:cd Desktop
)
Tip: You can also use thedir
command to list the folders. - In the code above the instructions, replace PACKAGE with the package that you wish to download.
- Copy and paste the modified code (shortcut CTRL + SHIFT + V) and press Enter
Example code to download Synaptic Package Manager:
sudo apt-get install synaptic --print-uris -qq | sed -n "s/'\([^ ]\+\)' \([^ ]\+\) \([^ ]\+\) MD5Sum:\([^ ]\+\)/wget -c \1/p" > install.sh
Example code to download VLC player:
sudo apt-get install vlc --print-uris -qq | sed -n "s/'\([^ ]\+\)' \([^ ]\+\) \([^ ]\+\) MD5Sum:\([^ ]\+\)/wget -c \1/p" > install.sh
- If asked, type in the root password and press Enter. (Do not panic if the characters for the password do not show. It's just a security measures.)
- The "install.sh" file should be now generated. All dependencies that are needed are included within the script.
- Now we need to run the script with this command:
sh install.sh
- Wait for the files to be downloaded
- Afterwards, you can either use this command to install all the packages within the folder:
sudo dpkg -i *.deb
Or you could use a program like Synaptics to install the packages. (Synaptics: File - Add downloaded packages)
Alternatively, you can also just double click the files. That will open the Ubuntu Software Center. Once software center is loaded, press the install button. Repeat this until all the files in the folder are installed.