Ubuntu: Generating an app list from the old installation to run it on the new installation


I want to shift from ubuntu-desktop 10.10 to ubuntu netbook edition 10.10 on my netbook. Currently, the moment I ssh into ubuntu from my ad-hoc network, ubuntu freezes. It always requires a cold shutdown. So hoping that netbook edition may not have this issue. I have custom installed many applications on the desktop edition. So I want save the app list into a script and run the script on the new installation, so that all apps will be downloaded and installed. I need suggestions as to the best way to achieve this.


Run this monster on your existing install, replace 12.04 your Ubuntu version and i386 with the architecture (i386 or amd64):

release_num='12.04'  arch='i386'    comm -23 \      <(sort <(aptitude search '~i!~E' --disable-columns | grep -v "i A " | cut -d " " -f 3)) \      <(sort <(wget -q -O- http://releases.ubuntu.com/maverick/ubuntu-${release_num}-desktop-${arch}.manifest | grep -E -o '^[^ ]+')) \  | sed 's/$/ install/g' > packages  

It will generate a file called packages. Copy this to somewhere in your new install and then run:

sudo apt-get update  sudo bash -c "cat packages | xargs apt-get -y install"  

Note: This compares the packages used on the LiveCD with the current ones. At the moment there are a few packages (gparted, btrfs-tools, etc) that are on the CD that aren't installed. If you installed gparted manually, you'll need to reinstall it on the new machine manually too. Thankfully this only applies to a few packages, all of which are simple to install if/when you realise you need it.

Also if you use any PPAs or other repositories, make sure you set them up on the new machine before you run this.


I suggest using oneconf Install oneconf

It integrates with Software Center rather nicely, and does what you want.


I think others have answered the technical piece of your question, I'd like to answer the implied question - "will moving to Unity fix this ssh problem", and the answer is I'm afraid I doubt it. Remote shell sessions are generally not exercising Unity or the desktop. If you can ssh fine into your desktop from a wired network, but not from an ad-hoc network, the freezing is probably related to your wireless drivers and not the desktop shell.


There's a file called 'filesystem.manifest-desktop' in the folder 'casper' on the CD (or extract it from the ISO file). It contains all the packages that get installed, minus the ones downloaded during the installation (updates, langpacks?).

So something like this should give you the list of added and removed packages:

dpkg --get-selections | awk '{print $1}' > now.txt  awk '{print $1}' filesystem.manifest-desktop > then.txt  diff -u then.txt now.txt | grep '^+' | sed 's/^+//' | grep -v '^+' > add.txt  diff -u then.txt now.txt | grep '^-' | sed 's/^-//' | grep -v '^-' > rem.txt  

You can then install via:

cat added.log | xargs sudo apt-get install

(You need to make sure that all those packages are available, else that command will fail.)

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »