Score:1

Is there a way to save/backup packages previously obtained using apt install from a now dead repository?

fk flag

A while back I installed a TV server program called Tvheadend using a PPA. The installation instructions and the program were on the site tvheadend.org which now appears to be dead (as of about three days ago, it seems). One of my pet peeves about installing software using apt is that you don't get a compressed installation file that you can hang onto for future use, like you would in Windows or MacOS. But what I was wondering is, does Ubuntu actually store the packages it downloads somewhere on the system, in a format where you could take that package and save it to an external drive or network share and then at some later time install it on a different system running Ubuntu, or even on the same system after doing a Ubuntu major version upgrade? I'd really like to be able to back this program up so that if I ever want to build another server I can still install it, but if there's a way to do that I am just not aware of it.

If there is not a way then that is really bad. I wish that Ubuntu would let you download some kind of install package to disk and then run that to install, as is the norm in Windows and MacOS, ESPECIALLY when you have to use a PPA to get software from a non-Ubuntu related site. But if there is a way, could someone please explain where Ubuntu stores those packages, and how I save a package for future use?

EDIT: The site finally came back up late Friday afternoon (US time) but thanks to those who replied!

guiverc avatar
cn flag
Ubuntu does have .deb packages; which can be saved & are downloaded when you `apt-get` to install, and this includes from PPAs. They remain on your system until removed by a user or runs a clean `apt autoclean` etc. Ubuntu has many tools to do what you want; which the user can perform if required. You didn't provide a release; as PPA/archives are usually only removed when a release goes EOL/unsupported.
UbuntuUser avatar
fk flag
"You didn't provide a release; as PPA/archives are usually only removed when a release goes EOL/unsupported." Sorry, I have no idea what you meant by that.
N0rbert avatar
zw flag
I can't reproduce any problem. I have just followed https://tvheadend.org/projects/tvheadend/wiki/AptRepositories on 20.04 LTS and got tvheadend amd64 4.2.8-36~g5bdcfd8ac~cosmic downloaded from *apt.tvheadend.org* and installed. What do you currently have for `apt-cache policy tvheadend` ?
UbuntuUser avatar
fk flag
The site came back up late yesterday afternoon.
Score:3
cn flag

does Ubuntu actually store the packages it downloads somewhere on the system,

Yes. See /var/cache/apt/archives. There are debs there you can use both software manager or dpkg to install it.

Tvheadend project sources can be found here though and was updated 2 days ago. If you want you can create your own account on github and clone the project.

UbuntuUser avatar
fk flag
Thank you. For whatever reason, the original file is not in /var/cache/apt/archives in fact it looks like there is nothing there more than a couple months old, which is odd because the system has been in use much longer than that. But the link to the PPA that you gave works so I downloaded the code as a zip file, so at least I have that. I don't know if I would actually be successful in installing from that but at least it is better than nothing.
us flag
` I don't know if I would actually be successful in installing from that ` -- See https://github.com/tvheadend/tvheadend#how-to-build-for-linux
Score:1
zw flag

The packages you usually install are .deb files, those files reside on launchpad and could be downloaded as

apt-get download your_package_name

Fully described in this question

In addition to that the installed pachages can be found in

/var/cache/apt/archive

But it won't help you very much, since each package is compiled/build against the libraries of that particular version.

Therefore as maintainer of a package you have to create several "variations" of the same code - check my PPA as example. So taking these packages -made for Ubuntu 20.04 and installing them in 21.10 might succeed, if the libs haven't changed, but you can't count on that. So it is rather futile to "save packages for later use".

So this is where "snap" comes into place - a snap package delivers all the libs needed and is not really dependent on anything outside. The penalty is redundant code, slow performance and not to mention the different look and feel of the UI if you have selected your own theme.

Finally there is a possibility to create an LXC container (lighter than docker) with the correct Ubuntu version, install your app there and share your native X-Server and let that software run in this container.

UbuntuUser avatar
fk flag
Problem is that this is the entry in the apt sources list: --- deb https://apt.tvheadend.org/stable focal main --- So as you can see it is going to tvheadend.org which is the site that is down, so doing "apt-get download" wouldn't work. And as I mentioned in my other comment, there's nothing older that a couple months in /var/cache/apt/archives.
Score:1
zw flag

You have to carefully follow TVHeadend official installation guide from https://tvheadend.org/projects/tvheadend/wiki/AptRepositories .

And then you can get the link to Lauchpad PPA which provides newer actual build of TVHeadend.
The newest package here for your Ubuntu 20.04 LTS was released at 2022-01-13 01:50:21 UTC with 4.3.0~pre+202201122318-0~built202201130132~gitc7b713edb~ubuntu20.04.1 version.

So it is installable by:

sudo apt-add-repository ppa:mamarley/tvheadend-git
sudo apt update
sudo apt install tvheadend

and its packages maybe downloaded directly from launchpad, found at /var/cache/apt/archives after installation or downloaded manually to any folder using apt-get download tvheadend .

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.