Here is a question for / users. Is there a way to backup a deb package from an existing system? For example, if the original deb has been removed from all the mirrors somehow, is it possible to re-create it from an existing machine some how?

@mhamzahkhan If you are lucky you still have the package in /var/cache/apt/archives/. In some cases it may possible to create a new package using the files from /var/lib/dpkg/info/ but I don't know if there is a program to make this easy.

@mhamzahkhan if it was installed on that machine, the deb might still be in /var/cache/apt

@mhamzahkhan then or are the only things I can think about :/

@mhamzahkhan oh and of course the repos of older releases.

But in that case you might have to extract the deb and change required dependency versions in the control file (and that will come with its own set of problems)

@mhamzahkhan Yeah. The first thing I would to is check if it's in your apt cache, I think the path is /var/cache/apt.

You can also find the files that belong to an (installed) package by running dpkg-query -L packagename. If it's a lot of files and you don't know of a practical way to deal with it let me know.

If that doesn't take you all the way let me know and I'll see what else we can come up with. :)

Sign in to participate in the conversation

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!