How can I find which apps I've installed using apt-get

Asked by Saul Lubkin

Previously, I installed Ubuntu on a week computer, and used apt-get to install
many useful packages, which I need. This tokk many days.

I'm now installing Ubuntu on a much better system. Rather than re-invent the wheel, which requires time that unfortunately I do not have now, I'd simply like to find out which packages I installed on the week computer.

Then, using apt-get, I can install these same packages on the new, much more powerful, computer.

But I don't know how to do this: I'm sure ther must be a file, that has this information in it somewhere?

Help much appreciated.

Thank you,

  -- Saul

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu apt Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
Last query:
Last reply:
Revision history for this message
Best actionparsnip (andrew-woodhead666) said :
#1

To replicate your packages selection on another machine (or restore it if re-installing), you can type:

aptitude --display-format '%p' search '?installed!?automatic' > ~/my-packages

move the file "my-packages" to the other machine, and there type:
sudo xargs aptitude --schedule-only install < my-packages ; sudo aptitude install

Done

Revision history for this message
Bhavani Shankar (bhavi) said :
#2

even simpler

dpkg --get-selections > mypakages.txt

will list the apps you have installed move that file and use apt again as suggested in above post

Regards

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

Unfortunately that wont work as it creates an output lkike this:

xserver-xorg-video-siliconmotion install
xserver-xorg-video-sis install
xserver-xorg-video-sisusb install
xserver-xorg-video-tdfx install
xserver-xorg-video-trident install
xserver-xorg-video-tseng install
xserver-xorg-video-v4l install
xserver-xorg-video-vesa install
xserver-xorg-video-vmware install
xserver-xorg-video-voodoo install
xsltproc install
xsplash install
xterm install
xulrunner-1.9 install
xulrunner-1.9-gnome-support install
xulrunner-1.9.1 install
xulrunner-1.9.1-gnome-support install
yelp install
zenity install
zip install
zlib1g install

Wheras my command generates output like this:

xserver-xorg-video-s3virge
xserver-xorg-video-savage
xserver-xorg-video-siliconmotion
xserver-xorg-video-sis
xserver-xorg-video-sisusb
xserver-xorg-video-tdfx
xserver-xorg-video-trident
xserver-xorg-video-tseng
xserver-xorg-video-v4l
xserver-xorg-video-vesa
xserver-xorg-video-vmware
xserver-xorg-video-voodoo
xsltproc
xsplash
xterm
xulrunner-1.9
xulrunner-1.9-gnome-support
yelp
zenity
zip
zlib1g

Also, my guide is the one from #ubuntu on irc.freenode.net from the ubottu bot. The installer may get confused by the rogue 'install' words in the file so may bork the process

Revision history for this message
Sam_ (and-sam) said :
#4
Revision history for this message
Sam_ (and-sam) said :
#5

Another example.
Create:
dpkg --get-selections | awk '!/deinstall|purge|hold/ {print $1}' > packages.list

Install:
xargs -a "packages.list" sudo apt-get install

Revision history for this message
Saul Lubkin (saul-lubkin) said :
#6

Thanks actionparsnip, that solved my question.