LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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, 11:56 AM   #1
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian
Posts: 1,534

Rep: Reputation: 112Reputation: 112
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, 12:05 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,367

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

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

Original Poster
Rep: Reputation: 112Reputation: 112
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, 01: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,519

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, 02:08 PM   #5
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian
Posts: 1,534

Original Poster
Rep: Reputation: 112Reputation: 112
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 12:36 PM
Is there a list of all installed packages? AgentD Slackware 6 05-28-2008 02:36 AM
list installed debian packages Fernandoch Debian 4 07-07-2005 06:16 AM
list of installed packages jeff1500 Slackware 3 03-22-2004 05:52 PM
List all installed Packages? mikeshn Linux - General 1 12-02-2003 11:31 PM

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

All times are GMT -5. The time now is 07:01 PM.

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