Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Restore packages list from another Ubuntu instalation

  1. #1
    Join Date
    Dec 2013
    Beans
    6

    Restore packages list from another Ubuntu instalation

    Hello,

    I am currently using Ubuntu 13.10 and I got a new laptop. I have installed Ubuntu 13.10 on the new desktop but it is missing all the softwares/packages that I have installed in the old laptop. I want to know if there is a way that I can get a list of all the packages from old laptop; then, using that list, I import it to the new laptop and install all the missing packages on the new laptop. Please let me know if it is possible and what command should I use.

    Thank you for your help.

  2. #2
    Join Date
    Jul 2007
    Location
    UK
    Beans
    16,927
    Distro
    Ubuntu Development Release

    Re: Restore packages list from another Ubuntu instalation

    http://kvz.io/blog/2007/08/03/restor...selectupgrade/

    Just adapt that and copy the text file to new machine.

  3. #3
    Join Date
    Apr 2011
    Location
    Mystletainn Kick!
    Beans
    5,404
    Distro
    Ubuntu

    Re: Restore packages list from another Ubuntu instalation

    On the laptop, just use
    Code:
    dpkg --get-selections > package.txt
    or whatever you want to name it.
    Then the text file will be in the users home folder, instead of the tmp directory.
    When you copy it over to the new machine, then use sudo to install.
    dpkg -get
    sudo dpkg -set

    No need to run sudo more than you need.
    Splat Double Splat Triple Splat
    Earn Your Keep
    Don't mind me, I'm only passing through.
    Once in a blue moon, I'm actually helpful
    .

  4. #4
    Join Date
    Jul 2007
    Location
    UK
    Beans
    16,927
    Distro
    Ubuntu Development Release

    Re: Restore packages list from another Ubuntu instalation

    Quote Originally Posted by deadflowr View Post
    On the laptop, just use
    Code:
    dpkg --get-selections > package.txt
    or whatever you want to name it.
    Then the text file will be in the users home folder, instead of the tmp directory.
    When you copy it over to the new machine, then use sudo to install.
    dpkg -get
    sudo dpkg -set

    No need to run sudo more than you need.
    Yeah. Too much sudo in that link I gave. I is on smart phone so limited typing and signal.

  5. #5
    Join Date
    Dec 2013
    Beans
    6

    Re: Restore packages list from another Ubuntu instalation

    Cool, that is nice. Did not know that there is a quick command like that. Thank you guys a lot.

  6. #6
    Join Date
    Oct 2009
    Location
    Reykjavík, Ísland
    Beans
    10,544
    Distro
    Lubuntu 15.04 Vivid Vervet

    Re: Restore packages list from another Ubuntu instalation

    Good, please mark the thread 'solved'.
    About problems due to upgrading
    Bringing old hardware back to life.
    Please visit Quick Links -> Unanswered Posts

  7. #7
    Join Date
    Dec 2013
    Beans
    6

    Re: Restore packages list from another Ubuntu instalation

    Hmm, I just follow your guide and your direction. When I type:
    dpkg --set-selections < packagelist.txt

    I got this line of error for every package

    dpkg: warning: package not in database at line ####: name of package

    Did I miss any step? Do I have to copy the sources list also? It is highly unlikely because some of the packages are very common, such as firefox, XBMC, VLC ....
    Please let me know. Thank you.

  8. #8
    Join Date
    Apr 2011
    Location
    Mystletainn Kick!
    Beans
    5,404
    Distro
    Ubuntu

    Re: Restore packages list from another Ubuntu instalation

    What was the output.

    Run an apt-get update, to refresh the database.
    Run it with sudo.
    Splat Double Splat Triple Splat
    Earn Your Keep
    Don't mind me, I'm only passing through.
    Once in a blue moon, I'm actually helpful
    .

  9. #9
    Join Date
    Dec 2013
    Beans
    6

    Re: Restore packages list from another Ubuntu instalation

    Ok, so I transfer the package.txt file to the new laptop. Then I execute:
    sudo dpkg --set-selections < package.txt

    Here is the error:
    dpkg: warning: package not in database at line 7: aes2501-wy
    dpkg: warning: package not in database at line 8: akonadi-facebook
    dpkg: warning: package not in database at line 16: android-tools-adb
    dpkg: warning: package not in database at line 16: android-tools-fastboot

    The error went the whole length of the text file up to line 1564. Yes, I did execute sudo apt-get update. I check the source list also. I miss some sources but the important one is still there.

    Please let me know if I did something wrong. Thank you.

  10. #10
    Join Date
    Apr 2011
    Location
    Mystletainn Kick!
    Beans
    5,404
    Distro
    Ubuntu

    Re: Restore packages list from another Ubuntu instalation

    Splat Double Splat Triple Splat
    Earn Your Keep
    Don't mind me, I'm only passing through.
    Once in a blue moon, I'm actually helpful
    .

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •