Ubuntu Pastebin

Paste from vco at Tue, 7 Apr 2015 17:45:46 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash

# This script is to back up installed packages
# and restore them. 
# taken from this guide http://eggsonbread.com/2010/01/28/move-ubuntu-to-another-computer-in-3-simple-steps/

# Create directory for list


p_dir=~/.installedPackages
# Create list of installed packages

dpkg --get-selections \
	| sed "s/.*deinstall//" \
	| sed "s/install$//g" \
	> $p_dir/packageList

# To reinstall the packages there's going to have to be 
# some kind of if condition, or possibly a rsync job to 
# create the package list folder. 
Download as text