Re: [DNG] Finding installed packages, but from a backup
On Thu, 31 Dec 2020 11:25:58 -0800 Rick Moen wrote: > My _personal_ favourite part of that StackExchange page is where it > says there's a solution to that difficult and vexing problem in the > Linuxmafia.com Knowledgebase at > http://linuxmafia.com/faq/Debian/package-database-rebuild.html . The preceding shellscript is what Linux, UNIX, BSD, and POSIX are all about. There's a reason Thompson and Ritchie gave us simple, tested and flawless commands to do one thing and do it right: So we could string them together to do something valuable and seemingly complex. SteveT Steve Litt Autumn 2020 featured book: Thriving in Tough Times http://www.troubleshooters.com/thrive ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
Re: [DNG] Finding installed packages, but from a backup
Quoting Antony Stone (antony.st...@devuan.open.source.it): > > this might be helpful : > > https://unix.stackexchange.com/questions/161866 > > Hm, some lessons for naïve sysadmins in there :) My _personal_ favourite part of that StackExchange page is where it says there's a solution to that difficult and vexing problem in the Linuxmafia.com Knowledgebase at http://linuxmafia.com/faq/Debian/package-database-rebuild.html . (But probably that's just me.) -- Cheers, "Like looking both ways before crossing the street, and Rick Moenthen getting hit by a submarine." -- Clarke Smith, age 9, r...@linuxmafia.com winner of Washington Post's contest for best description McQ! (4x80) of the year 2020 in a single word or phrase. ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
Re: [DNG] Finding installed packages, but from a backup
Dear Anthony, Am Donnerstag, 31. Dezember 2020 schrieb Antony Stone: > Hi. > > I know I can get a list of the packages installed on a > currently-running system using commands such as: > > dpkg-query -l > apt list --installed > aptitude search ~i > > However, if there any way I can do the same thing, but when I simply > have a copy (backup) of the machine, and it's not currently running? > The backup is on another Debian / Devuan system (which may or may not > be the same release version). > > I have _all_ files from the machine I want to investigate, and I'm > hoping that there's something in /var/cache/apt or /var/lib/dpkg > which would allow me to get the same sort of list as the above > commands produce. > > Does anyone have any ideas? You need the contents of the directory "/var/lib/dpkg", then easy-peasy go with this: dpkg --admindir=/dir/to/backup/of/var/lib/dpkg --get-selections "**" HTH Kind regards, Stefan ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
Re: [DNG] Finding installed packages, but from a backup
Not sure this is exactly what you are after but I have a cron job that runs: dpkg --get-selections | grep -v "deinstall$" | grep -v "hold$" | grep "install" | awk '{print $1;}' and put the output in a file that I backup or grab, i.e. ~/selections-$(hostname).txt. The file is usually just a reference but it could be fed to apt after a minimal install to produce a new similar system. //PG On 2020-12-31 11:50, Antony Stone wrote: Hi. I know I can get a list of the packages installed on a currently-running system using commands such as: dpkg-query -l apt list --installed aptitude search ~i However, if there any way I can do the same thing, but when I simply have a copy (backup) of the machine, and it's not currently running? The backup is on another Debian / Devuan system (which may or may not be the same release version). I have _all_ files from the machine I want to investigate, and I'm hoping that there's something in /var/cache/apt or /var/lib/dpkg which would allow me to get the same sort of list as the above commands produce. Does anyone have any ideas? Antony. ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
Re: [DNG] Finding installed packages, but from a backup
On Thursday 31 December 2020 at 12:18:24, Dimitris via Dng wrote: > Στις 31/12/20 12:50 μ.μ., ο/η Antony Stone έγραψε: > > I have_all_ files from the machine I want to investigate, and I'm hoping > > that there's something in /var/cache/apt or /var/lib/dpkg which would > > allow me to get the same sort of list as the above commands produce. > > /var/lib/dpkg/status holds all installed packages. Ooh, excellent - thanks - just what I needed :) > this might be helpful : > https://unix.stackexchange.com/questions/161866 Hm, some lessons for naïve sysadmins in there :) Thanks, Antony. -- #define SIX 1+5 #define NINE 8+1 int main() { printf("%d\n", SIX * NINE); } - thanks to ECB for bringing this to my attention Please reply to the list; please *don't* CC me. ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
Re: [DNG] Finding installed packages, but from a backup
Στις 31/12/20 12:50 μ.μ., ο/η Antony Stone έγραψε: I have_all_ files from the machine I want to investigate, and I'm hoping that there's something in /var/cache/apt or /var/lib/dpkg which would allow me to get the same sort of list as the above commands produce. /var/lib/dpkg/status holds all installed packages. this might be helpful : https://unix.stackexchange.com/questions/161866/how-to-recreate-var-lib-dpkg-status d. ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
[DNG] Finding installed packages, but from a backup
Hi. I know I can get a list of the packages installed on a currently-running system using commands such as: dpkg-query -l apt list --installed aptitude search ~i However, if there any way I can do the same thing, but when I simply have a copy (backup) of the machine, and it's not currently running? The backup is on another Debian / Devuan system (which may or may not be the same release version). I have _all_ files from the machine I want to investigate, and I'm hoping that there's something in /var/cache/apt or /var/lib/dpkg which would allow me to get the same sort of list as the above commands produce. Does anyone have any ideas? Antony. -- Wanted: telepath. You know where to apply. Please reply to the list; please *don't* CC me. ___ Dng mailing list Dng@lists.dyne.org https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng