Let's say you want to do a fresh install of Ubuntu (or Debian) and you want to install all the packages you currently have installed on the fresh installation.The first method of doing this is very easy:Create a text file with all the currently installed applications:Then save the "installed-applications.txt" file somewhere.To install all the packages from the "installed-applications.txt" to the fresh Ubuntu installation (or another computer), you have to run this:(don't forget to copy the "installed-applications.txt" to the new fresh installation / other computer or whatever)

1. Preparations

sudo apt-get install equivs

cd && mkdir webupd8package

cd webupd8package/

mkdir debian

cd debian/

equivs-control control

### Commented entries have reasonable defaults.

### Uncomment to edit them.

Section: misc

Priority: optional

Standards-Version: 3.6.2



Package: <package name; defaults to equivs-dummy>

# Version: <enter version here; defaults to 1.0>

# Maintainer: Your Name <yourname@example.com>

# Pre-Depends: <comma-separated list of packages>

# Depends: <comma-separated list of packages>

# Recommends: <comma-separated list of packages>

# Suggests: <comma-separated list of packages>

# Provides: <comma-separated list of packages>

# Replaces: <comma-separated list of packages>

# Architecture: all

# Copyright: <copyright file; defaults to GPL2>

# Changelog: <changelog file; defaults to a generic changelog>

# Readme: <README.Debian file; defaults to a generic one>

# Extra-Files: <comma-separated list of additional files for the doc directory>

Description: <short description; defaults to some wise words>

long description and info

.

second paragraph

2. Editing the control file.

2.1

cd

sudo aptitude search -F %p ~i --disable-columns libedataserver | sed 's/$/,/' | tr '

\r' ' ' | sed 's/, $//' > installed-applications.txt

2.2

gedit ~/webupd8package/debian/control

### Commented entries have reasonable defaults.

### Uncomment to edit them.

Section: misc

Priority: optional

Standards-Version: 3.6.2



Package: webupd8package

Version: 1.0

Maintainer: Andrew < andrew@webupd8.org >

# Pre-Depends: <comma-separated list of packages>

Depends: paste here the entire contents of the file you got in step 2.1

# Recommends: <comma-separated list of packages>

# Suggests: <comma-separated list of packages>

# Provides: <comma-separated list of packages>

# Replaces: <comma-separated list of packages>

Architecture: all

# Copyright: <copyright file; defaults to GPL2>

# Changelog: <changelog file; defaults to a generic changelog>

# Readme: <README.Debian file; defaults to a generic one>

# Extra-Files: <comma-separated list of additional files for the doc directory>

Description: All my applications packed into a deb file

3. Creating the .deb file

cd

cd webupd8package/debian/



equivs-build control

Note for both methods:

/etc/apt/sources.list

/etc/apt/sources.list.d

This second method of reinstalling all of your current installed packages on a fresh Ubuntu installation is basically a simplified method of creating a .deb file and it only requires editing one file to actually create the .deb file, as opposed to the official way which we've talked about HERE This step involves installing a package called equivs, creating a folder with our package name (can be whatever you want, but make sure there is no package in the repositories under the same name) and creating the "control" file for our .deb package.The last command will create a file called "control" in the ~/webupd8package/debian folder. This is basically a template of the control file and it looks like this:Our .deb file will be basically the same as the project called "Ubuntu b-sides", but with all the packages you currently have installed (you can of course modify the package list with any packages you want). It will only have a few kb as it is a meta package which comes with all your currently installed packages as dependencies.Very important: Before editing the control file, you need a list of the currently installed application. We're not going to use the command from the beginning of the post but this one:The reason for doing this is to have the applications separated by a comma so you can easily paste the list in the control file. Thanks to realubot for this.Editing the control file.If you don't know how to edit this on your own, you can simply paste the following text instead of all the contents in the control file (of course, edit your name and email).Firstly open the control file (type the following command in a terminal):And replace the whole contents of the file with this (this is a very basic setup):Now all we have to do is run the command which will generate the .deb file. Firstly navigate to the "debian" folder:And finally run the command which will generate the .deb package:This second method may seem complicated at a first glance, but in fact it will only take you 3-4 minutes to complete!to also install the applications from PPAs, you will have to import yourfile to the new installation (basically all the PPAs are in there). If you used multiple sources files, copy them all to the new installation (from).