If you're only interested in the .deb packages and nothing else, then do this:
wget --no-verbose --no-parent --recursive --wait=1 -A deb https://ppa.launchpadcontent.net/TEAM_NAME/PPA_NAME/ubuntu/pool/
To mirror an entire PPA with wget
, run it like this (yt-dlp
PPA used as an example):
wget --no-verbose --mirror --convert-links --no-parent --wait=1 https://ppa.launchpadcontent.net/yt-dlp/stable/ubuntu/
The link above can be obtained from the PPA page in Launchpad, click "Technical details about this PPA" and get the first link that appears.
You can now browse the PPA locally, or make it available to other computers with:
python3 -m http.server --directory ppa.launchpadcontent.net
Navigating to http://0.0.0.0:8000/ in a local browser should work.
With the HTTP server still running, you can add this local repo to a client computer running a compatible Ubuntu release and install packages from it:
echo "deb http://<your-ip>:8000/yt-dlp/stable/ubuntu $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/90local.list
sudo apt update
If you get an error like NO_PUBKEY E0D04D2E936B2F90
, import the developer's key:
gpg --no-default-keyring --keyring=/usr/share/keyrings/yt-dlp.gpg --keyserver keyserver.ubuntu.com --recv-keys E0D04D2E936B2F90
Then change the repository definition to use this key on the client machine:
echo "deb [signed-by=/usr/share/keyrings/yt-dlp.gpg] http://<your-ip>:8000/yt-dlp/stable/ubuntu $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/90local.list
sudo apt update
There should be no errors. You can now query the package cache to confirm that apt sees the package in your local repository:
apt-cache madison yt-dlp