LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-08-2014, 10:56 AM   #1
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian
Posts: 1,432

Rep: Reputation: 110Reputation: 110
Getting a list of installed packages in Debian (but the OS is not running)


I am aware of this:

Code:
# dpkg --get-selections > installed-software.txt
However, I want to extract that information from an external, backup disk, i.e. a system that is not running.

Where is that information stored, exactly?
 
Old 11-08-2014, 11:05 AM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
/var/cache/apt/archives

--------------------------
Steve Stites
 
1 members found this post helpful.
Old 11-08-2014, 11:24 AM   #3
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian
Posts: 1,432

Original Poster
Rep: Reputation: 110Reputation: 110
Hmm. I haven't tried it on the dormant OS yet, but I just tried it on the other, live system I am using now, and found nothing there:

root@luc ~# ls -la /var/cache/apt/archives/
total 44
drwxr-xr-x 3 root root 36864 Nov 8 15:21 ./
drwxr-xr-x 3 root root 4096 Nov 8 13:56 ../
-rw-r----- 1 root root 0 Nov 5 06:44 lock
drwxr-xr-x 2 root root 4096 Nov 8 13:53 partial/
root@luc ~# ls -la /var/cache/apt/archives/partial/
total 40
drwxr-xr-x 2 root root 4096 Nov 8 13:53 ./
drwxr-xr-x 3 root root 36864 Nov 8 15:21 ../

The 'lock' file is empty.
 
Old 11-08-2014, 12:53 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Debian :

1) dpkg log
# cat /var/log/dpkg.log | grep "\ installed\ "
The file with the latest packages installed is /var/log/dpkg.log
The next file in the 'history' is 'dpkg.log1'
And further back the files are e.g. 'dpkg.log2.gz' and readable with :
zcat /var/log/dpkg.log.2.gz | grep "\ installed\ "

2)
$ ls -tl /var/lib/dpkg/info/ | grep list > installed-packages-.txt

-
 
1 members found this post helpful.
Old 11-08-2014, 01:08 PM   #5
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian
Posts: 1,432

Original Poster
Rep: Reputation: 110Reputation: 110
Both solutions you propose also list packages that have been uninstalled. But then I checked and found that using dpkg on a live system does the same.

That's OK, that will do. Thanks.
 
  


Reply

Tags
debian packages



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to save a list of installed packages and install these packages later mandavi Ubuntu 5 09-07-2009 11:36 AM
Is there a list of all installed packages? AgentD Slackware 6 05-28-2008 01:36 AM
list installed debian packages Fernandoch Debian 4 07-07-2005 05:16 AM
list of installed packages jeff1500 Slackware 3 03-22-2004 04:52 PM
List all installed Packages? mikeshn Linux - General 1 12-02-2003 10:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration