Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-15-2012, 06:38 AM   #1
Registered: Mar 2009
Distribution: Debian
Posts: 69

Rep: Reputation: 2
Help with apt-get or dpkg

I need to reinstall my system on a larger drive.
To find a list of installed pkges, I ran "# dpkg --get-selections > file".
The output list is huge and mostly filled with dependencys.

I am looking for a way (possibly a bash script) to reduce this list down to just the packages I have installed.

I will be installing the latest version of Ubuntu, from a netist cd.
I will not be installing Gnome, KDE or XFCE, just Openbox and its magical pipe menus.
Old 06-15-2012, 11:40 PM   #2
Senior Member
Registered: Apr 2005
Location: OZ
Distribution: Debian Sid/RPIOS
Posts: 4,865
Blog Entries: 28

Rep: Reputation: 530Reputation: 530Reputation: 530Reputation: 530Reputation: 530Reputation: 530
The output is All of the packages you have installed.

if you do not want them all I would suggest making a list of the ones you want.
Old 06-17-2012, 09:15 AM   #3
Registered: Mar 2009
Distribution: Debian
Posts: 69

Original Poster
Rep: Reputation: 2
Did not really answer the question. Unless you can lend me a time machine.
The "status" file tells me which packages are installed as dependencys of other packages. These packages can safely be excluded from the "install" list.
The remaining "Install" list would be human readable, and could be edited to remove redundant packages, or packages that are still installed, but no longer used.

This is the list I am trying to extract from a running machine.
Old 06-17-2012, 02:42 PM   #4
Registered: Aug 2007
Location: India
Distribution: Slackware (mainly) and then a lot of others...
Posts: 855

Rep: Reputation: Disabled
I think you might want to look at /var/lib/aptitude/pkgstate. I run Ubuntu so this might not be the same,
Hope this helps.


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
apt-get dpkg error 5%dpkg akhund_bilal Debian 17 01-16-2022 08:25 PM
APT/dpkg errors! /var/lib/dpkg/status bassclarinet Debian 16 12-01-2011 09:24 AM
[SOLVED] DPKG/apt-get broken - GLIBC_2.6 not found (required by dpkg) Alize Linux - Software 15 05-23-2011 04:25 AM
Apt-get, Dpkg Kincaid Debian 3 03-01-2007 07:52 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:38 PM.

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