Where, and how, do I install multiple packages stored in a local directory? [duplicate]
I've found several posts about mass installing Linux packages with one command here, here, and here.
Here's my situation. I'm in a 3rd-world country right now with limited internet access. I want to know if there's a way to download a bunch of packages, store them somewhere, and write a little bash script to mass install them.
Is there a website that has a repository where I can do a one-time download of these permanently instead of having to use a bunch of data doing "apt-get" every time I try out a fresh installation of a Linux distro?
After I download these is there a way I can easily install them all these deb or tar files by writing a little bash script?
12 Answers
To download them all:
- Create a text file with their names, one on each line.
Create a folder to store these package files:
mkdir ~/packages_storeRead and download the
debfile of each package on that list:#!/usr/bin/env bash # Change to the storage folder # or exit if it doesn't exist cd ~/packages_store || exit # Remove blank lines first then read # from file sed '/^$/d' "$1" | while read -r line; do apt-get download "$line" done- Usage:
chmod +x myscript.sh, thensudo ./myscript.sh /path/to/text_with_packagenames
- Usage:
To install all:
- Change into that folder
cd ~/packages_store Run installer:
sudo apt-get install *.deb
- Change into that folder
Hopefully this is what you’re looking for!
4Here is the repository of Ubuntu Packages. Search desired package with ubuntu flavour and install it with apt procedure.
2