User Tools

Site Tools


howtos:create_a_package_list

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
howtos:create_a_package_list [25/08/2017 14:08] – created domingohowtos:create_a_package_list [02/12/2018 21:34] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== Intro ======
 +
 +Reinstalling a machine it can be a pain to remember all the packages installed that must be installed again.
 +
 +Here's a dirty description of how to make an install list.
 +
 +Note this is done on a Ubuntu system.
 +
 +
 +
 +
 +
 +===== Making the list =====
 +
 +Not all software on the system is taken from the repositories and thus can't be used in the install script. So first find the software that must be excluded from the list.
 +
 +Go into Synaptics and find the selection "Status" down in the left corner. Click on it and select "Installed (local or obsolete)":
 +
 +{{:howtos:screenshot-synaptic_package_manager_.png|:howtos:screenshot-synaptic_package_manager_.png}}
 +
 +
 +
 +This list of packages must be filtered out of the list. Here is a command creating a list and filtering out what I must download afterwards:
 +
 +<code>
 +dpkg -l |grep '^ii '|sed -r 's/ii\s+(\S+)\s+.*/\1/i'|egrep -v  "zattoo|virtualbox|truecrypt|pytube|parcellite|opera|nxclient|flv2mpeg4|adobereader-enu"  > list.txt  
 +</code>
 +
 +The part "egrep -v "zattoo|virtualbox...." is the list of software that I manually downloaded and installed on the system.
 +
 +The file list.txt now contains the list of packages that was installed on the old system.
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +===== Using the list =====
 +
 +Now to get all the software back on the new system, copy list.txt onto it and run:
 +
 +<code>
 +sudo for i in `cat list.txt`; do apt-get install -y $i; done
 +</code>
 +
 +
 +Et voilà and your system is now a lot heavier with software LOL
 +
 +//Update//: A quicker way of installing the software is to convert the list into one line [[regex-stuff-mail#Making a list one line| see a description here]].
 +
 +<code>
 +sudo apt-get install -y `cat list.txt | tr "\n" " "`
 +</code>
 +
 +
 +
 +{{:howtos:list.txt|list.txt}}
 +
 +{{:howtos:truecrypt-4.3a-ubuntu-7.10-x86.tar.gz|truecrypt-4.3a-ubuntu-7.10-x86.tar.gz}}
 +
 +{{:howtos:run.sh.txt|run.sh.txt}}