Three easy steps to Install Ubuntu Fresh but still have all your Favourite Packages Installed

Also, there is a very interesting article at Linux Owns showing three steps to get all your favourite packages (back) fast. I added a fourth step actually saving your package list for later use. Deriving it straight from there (without testing, since unfortunatelly my last machine has been hardyed just a couple of hours ago):

  1. integrate medibuntu sources.list
    sudo wget -O /etc/apt/sources.list.d/medibuntu.list
  2. add server key
    wget -q -O- | sudo apt-key add - && sudo apt-get update
  3. write a text file listing all package names you wish installed separated with spaces — you should be able to instead put every package name in one line with trailing \\ (double back-slash) but as I said: I haven’t tested it, yet! Name it, say, most_important_debs.
  4. sudo aptitude --assume-yes install < most_important_debs
    You might want to approve the package list before install. In that case omit --assume-yes</li>
    Let me know it someone used it (hopefully with success).
    <strong>Update</strong> 2008/05/15: It does help to read and think before you speak (or write for that matter). I got it completely wring. The linked article is about packages from <a href="">Medi</a><a href="">buntu</a> only. OK then, if it's like this I just alter 1, 2, <span style="text-decoration:line-through;">4</span> and 3 -&gt; 1 🙂
    	<li>build a list of your (most important, enduser) packages</li>
    	<li>update-manager -d, i.e. dist-upgrade your system</li>
    	<li>employ aptitude to read in your file (to be exact it's bash that redirect from the file...)</li>
    Of course, this method still does not solve the problem of saving your personal settings but still get all the system settings from the new distro release. But this shouldn't be that hard for release maintainers since they (potentially) know which package version had what config files delivered or generated. From there it should be easy to determine if a system config file has been changed be the user -&gt; show diff. Or do I overlook something once again?
    <strong>Update</strong> 2008/05/15: Even better looks aptitude-run-state-bundle:
    aptitude-create-state-bundle produces a compressed archive storing the files that are required to replicate the current
    package archive state.  The following files and directories are included in the bundle:
    ·      $HOME/.aptitude
    ·      /var/lib/aptitude
    ·      /var/lib/apt
    ·      /var/cache/apt/*.bin
    ·      /etc/apt
    ·      /var/lib/dpkg/status
    The output of this program can be used as an argument to aptitude-run-state-bundle(1).</blockquote>
    Update 2008/05/15: A good starting point would be either
    dpkg -l | grep ^i | editor

    or if you don’t use aptitude this also shows (only currently) installed packages

    dpkg -l | grep ^i | editor

    One needs to remove non-package-name strings, though. As I haven’t come around to learn sed (line editing) I cannot show how to deploy sed to do it. Anyone?


  1. Saturday, 18th Jun 2011 at 12:39

    Thanks for revealing your ideas. The first thing is that college students have an alternative between national student loan and also a private student loan where its easier to decide on student loan debt consolidation loan than in the federal education loan.

  2. Joe Tole said,

    Friday, 24th Apr 2009 at 00:34

    wow, when I wrote less then sign, “tab”, greater then sign, your page also removed it. Looks like bad practice for preventing SQL injections. I agree you should block them but it can be done without editing user content.

  3. Joe Tole said,

    Friday, 24th Apr 2009 at 00:32

    Your page translates single quotes into back ticks which means neither command will work if you copy and paste it but you can copy it and change the items that look like single quotes to single quotes and remember, cut -d”, tab is ctrl+v+i

    • sysblog said,

      Monday, 4th May 2009 at 18:32

      Well, to be honest I can only imagine what you are talking about. But not enough so that I can rephrase your suggestion.

      By the why I’m not actually running this blog myself but rather use it on so you might want to help them fix their problem as you seam to know more than me what you are trying to point out.


  4. Joe Tole said,

    Friday, 24th Apr 2009 at 00:30

    Well for sed you can do:
    dpkg -l | grep ^ii | sed -e ‘s/^ii\ *\([^ ]*\).*/\1/’

    you can also use:
    dpkg –get-selections | grep -v ‘ deinstall$’ | cut -d’ ‘ -f1

    The section between the single quotes on the cut command is a tab which you can make in bash by using ctrl+v+i

    • sysblog said,

      Monday, 4th May 2009 at 18:27

      Thans for sharing, Joe

    • Noah Spurrier said,

      Friday, 26th Feb 2010 at 03:38

      You don’t need to set the field delimiter on `cut`. The default is a tab.
      Also your grep -v doesn’t work — maybe wordpress added spaces inside
      the quote. I converted them to regular straight quotes. But you don’t really
      need to quotes anyway.

      dpkg –get-selections | grep -v deinstall$ | cut -f1

Leave a Reply to Joe Tole Cancel reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: