diff --git a/bin/pack.php b/bin/pack.php
deleted file mode 100755
index 3328cf20d8346065615e78c6ad258e0929ac57cc..0000000000000000000000000000000000000000
--- a/bin/pack.php
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/usr/bin/env php
-<?php
-
-/* This is the base directory of the simpleSAMLphp installation. */
-$baseDir = dirname(dirname(__FILE__));
-
-/* Add library autoloader. */
-require_once($baseDir . '/lib/_autoload.php');
-
-if (count($argv) < 1) {
-	echo "Wrong number of parameters. Run:   " . $argv[0] . " [install,show] url [branch]\n"; exit;
-}
-
-// Needed in order to make session_start to be called before output is printed.
-$session = SimpleSAML_Session::getSessionFromRequest();
-$config = SimpleSAML_Configuration::getConfig('config.php');
-
-
-$action = $argv[1];
-
-
-function getModinfo() {
-	global $argv;
-	if (count($argv) < 2)
-		throw new Exception('Missing second parameter: URL/ID');
-	return sspmod_core_ModuleDefinition::load($argv[2]);
-}
-
-function getBranch() {
-	global $argv;
-	if (isset($argv[3])) return $argv[3];
-	return NULL;
-}
-
-switch($action) {
-	case 'install':
-	 	$mod = getModinfo();
-		$installer = new sspmod_core_ModuleInstaller($mod);
-		$installer->install(getBranch());
-		break;
-	
-	case 'remove': 
-	 	$mod = getModinfo();
-		$installer = new sspmod_core_ModuleInstaller($mod);
-		$installer->remove(getBranch());
-		break;
-		
-	case 'upgrade': 
-	 	$mod = getModinfo();
-		$installer = new sspmod_core_ModuleInstaller($mod);
-		$installer->upgrade(getBranch());
-		break;
-	
-	case 'upgrade-all' :
-		$mdir = scandir($config->getBaseDir() . 'modules/');
-		foreach($mdir AS $md) {
-			if (!sspmod_core_ModuleDefinition::validId($md)) continue;
-			if (!sspmod_core_ModuleDefinition::isDefined($md)) continue;
-			$moduledef = sspmod_core_ModuleDefinition::load($md, 'remote');
-			$installer = new sspmod_core_ModuleInstaller($moduledef);
-			
-			if ($moduledef->updateExists() || $moduledef->alwaysUpdate()) {
-				echo "Upgrading [" . $md . "]\n";
-				$installer->upgrade();				
-			} else {
-				echo "No updates available for [" . $md . "]\n";
-			}
-		}
-		break;
-			
-	default: 
-		throw new Exception('Unknown action [' . $action . ']');
-}
-
-
-
-
diff --git a/docs/index.txt b/docs/index.txt
index 774411535d7712e3135654b122c5dd554cabe1fe..2ef4777a1809228c8154466f888502b38a5a6f09 100644
--- a/docs/index.txt
+++ b/docs/index.txt
@@ -34,7 +34,6 @@ SimpleSAMLphp Documentation
  * [SimpleSAMLphp Dictionaries and Translation](simplesamlphp-translation)
  * [Theming simpleSAMLphp](simplesamlphp-theming)
  * [simpleSAMLphp Modules](simplesamlphp-modules) - how to create own customized modules
- * [Installing third party modules with the pack.php tool](pack)
  * [Key rollover](./saml:keyrollover)
  * [Creating authentication sources](./simplesamlphp-authsource)
   * [Implementing custom username/password authentication](./simplesamlphp-customauth)
diff --git a/docs/pack.txt b/docs/pack.txt
deleted file mode 100644
index e562011c2162dd319f98a2997d0677a393ea4aee..0000000000000000000000000000000000000000
--- a/docs/pack.txt
+++ /dev/null
@@ -1,149 +0,0 @@
-The pack.php tool - Installation of third party SimpleSAMLphp modules
-=====================================================================
-
-<!-- 
-	This file is written in Markdown syntax. 
-	For more information about how to use the Markdown syntax, read here:
-	http://daringfireball.net/projects/markdown/syntax
--->
-
-<!-- {{TOC}} -->
-
-
-
-This document describes the use of the `bin/pack.php` command line tool, and how it can be used to install third party SimpleSAMLphp modules.
-
-*WARNING:* The *pack.php* tool is a recently added cutting edge tool that is considered experimental. We need to gather more experience and add better security before we will reccomend using this tool for production setups.
-
-
-Online Module Repository
-------------------------
-
-
-The official repository of SimpleSAMLphp modules is available at:
-
-  * <http://simplesamlphp.org/modules>
-
-Anyone can contribute simpleSAMLphp modules, so no guarantees on the quality of the module.
-
-
-The anatomy of a module
------------------------
-
-A module is represented by **an identifier** that should be unique (you may not install two modules with the same identifier). An example of such an identifier is `metalisting`. The identifier is also the name of the first level directory that will be placed within the `modules/` directory in your simpleSAMLphp installation.
-
-For a module to be handled by the *pack.php* tool, the module must have a **definition file**. The author or distributor of the module will provide a definition file. In order to install and upgrade modules and use the *pack.php* tool you do not need to care about the definition file, but it is good to know what is going on under the hood. The definition file is encoded in JSON and should be publicly available over HTTP. The URL of the defintion file is often used as a parameter to the *pack.php* tool. Once the module is installed you may switch to use the identifier as a parameter representing the module instead, and the identifier now is known to your local installation, and may find it's way to the remote defintion file automatically.
-
-Here is an example of a defintiion file:
-
-	{
-		"id"			: "selfregister",
-		"name"			: "Self-register",
-		"descr"			: "Allows users to register new accounts.",
-		
-		"definition"	: "http://simplesamlphp-labs.googlecode.com/svn/trunk/modules/selfregister/definition.json",
-		"branch"		: "dev",
-		
-		"access"		: {
-			"dev"		: {
-				"type"		: "svn",
-				"version"	: "0.1",
-				"url"		: "http://simplesamlphp-labs.googlecode.com/svn/trunk/modules/selfregister"
-			}
-		}	
-	}
-
-A module may be available as multiple **branches**. Typically a branch represents different levels of maturity; you may have a alpha branch including the latest feature but not well tested, and a stable branch including a well-tested version with not the latest features. Branches may also be used to provide multiple versions of the module that may work with different versions of simpleSAMLphp. Say that the module uses an internal SimpleSAMLphp API that changes from the simpleSAMLphp 1.X to 2.X version; then the module may exists in a 1.X and a 2.X version. The available branches shuold be well explained in the module description.
-
-A module may be offered using different alternative **access methods**. Currently two access methods is supported:
-
-  * zip: The module is provided compressed to a zip file, offered on a HTTP location. This access method requires installation of the *unzip* command line tool, if not already available.
-  * svn: The module is available in a public subversion repository. This access method requires installation of the command line *svn* tool, if not already available.
-
-
-
-
-
-
-A list of your installed modules
---------------------------------
-
-In your simpleSAMLphp installation home page, on the *configuration* tab, there is a link *Available modules*. 
-
-This page shows a list of all modules available in your installation, and which of them that is currently *enabled*. For the third party modules some more information is available, such as the version number, the installed branch, and whether there exists a more recent version.
-
-The screenshot below shows an example from the available modules page:
-
-![](http://clippings.erlang.no/ZZ37ACC060.jpg)
-
-
-
-Using the pack.php tool
------------------------
-
-Use the command line, and go to the installation directory of simpleSAMLphp.
-
-
-### Installing a module
-
-To install a module you should use this command:
-
-	bin/pack.php install [module] [branch]
-
-The *[module]* parameter should be the URL of a definition file.
-
-If the *[branch]* argument is left out, the default branch will be installed. Here is an example for installing the metalisting module:
-
-	bin/pack.php install http://simplesamlphp-labs.googlecode.com/svn/trunk/modules/metalisting/definition.json
-
-The installation of a module will include the module in the `modules/` directory, and copy all configuratino files from `config-templates/` to the global `config/` directory. It will also force enabling the module, by creating an empty `enable` file in the module directory.
-
-
-### Removing a module
-
-To remove a module:
-
-	bin/pack.php remove [module]
-
-The [module] argument may be either a defintion URL, or a module identifier. In example to remove the metalisting module, type:
-
-	bin/pack.php remove metalisting
- 
-
-### Upgrading a module
-
-To upgrade a module:
-
-	bin/pack.php upgrade [module]
-
-The [module] argument may be either a defintion URL, or a module identifier. In example to upgrade the metalisting module, type:
-
-	bin/pack.php upgrade metalisting
-
-Upgrading a module will upgrade to the latest version of the currently installed branch. If the access method is subversion, it will run `svn update`. If the access method is zip, it will compare the version number of the latest available version with the locally installed version.
-
-
-
-### Upgrading all modules
-
-
-If you type:
-
-	bin/pack.php upgrade-all
-
-all installed third party modules will be upgraded to the latest version of the currently installed branch.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/modules/core/lib/ModuleInstaller.php b/modules/core/lib/ModuleInstaller.php
deleted file mode 100644
index 5dde6fe55852ec63a533d259bb03a3adaa5d332c..0000000000000000000000000000000000000000
--- a/modules/core/lib/ModuleInstaller.php
+++ /dev/null
@@ -1,190 +0,0 @@
-<?php
-
-
-/**
- * Perform installation and updates on simpleSAMLphp modules
- * based on information found in a module definition.
- *
- * @Author	Andreas Ă…kre Solberg, <andreas.solberg@uninett.no>
- */
-class sspmod_core_ModuleInstaller {
-	
-	public $module;
-	
-	public function __construct(sspmod_core_ModuleDefinition $module) {
-		$this->module = $module;
-		
-	}
-	
-	public function remove($branch = NULL) { 
-		$access = $this->module->getAccess($branch);
-		
-		switch($access['type']) {
-			default:
-				$this->requireInstalled();
-				$this->removeModuleDir($access);
-				break;
-				
-		}
-	}
-	
-	public function install($branch = NULL) {
-		
-		$access = $this->module->getAccess($branch);
-		
-		switch($access['type']) {
-			case 'svn' :
-				$this->requireNotInstalled();
-				$this->svnCheckout($access);
-				$this->enable();
-				$this->prepareConfig();
-				break;
-			
-			case 'zip' :
-				$this->requireNotInstalled();
-				$this->zipLoad($access);
-				$this->enable();
-				$this->prepareConfig();
-				break;
-
-			
-			default:
-				throw new Exception('Unknown access method type. Not one of [zip,tgz,svn]');
-				
-		}
-		
-	}
-	
-	public static function exec($cmd) {
-		echo ' $ ' . $cmd . "\n";
-		$output = shell_exec(escapeshellcmd($cmd));	
-		
-		if (empty($output)) return;
-		
-		$oa = explode("\n", $output);
-		
-		foreach($oa AS $ol) {
-			echo ' > ' . $ol . "\n";			
-		}
-
-	}
-	
-	public function upgrade($branch = NULL) {
-		
-		$access = $this->module->getAccess($branch);
-		
-		switch($access['type']) {
-			case 'svn' :
-				$this->requireInstalled();
-				$this->svnUpdate($access);
-				$this->enable();
-				$this->prepareConfig();
-				break;
-				
-			case 'zip' :
-				$this->requireInstalled();
-				$this->zipLoad($access);
-				$this->enable();
-				$this->prepareConfig();
-				break;
-			
-			default:
-				throw new Exception('Unknown access method type. Not one of [zip,tgz,svn]');
-				
-		}
-		
-	}
-	
-	public function dirExists() {
-		$config = SimpleSAML_Configuration::getConfig('config.php');
-		$basedir = $config->getBaseDir();
-		
-		$dir = $basedir . 'modules/' . $this->module->def['id'];
-		
-		return (file_exists($dir) && is_dir($dir));
-	}
-	
-	public function requireValidURL($url) {
-		if (!preg_match('|http(s)?://[a-zA-Z0-9_-/.]|', $url)) 
-			throw new Exception('Invalid URL [' . $url . ']');
-	}
-	
-	public function requireNotInstalled() {
-		if ($this->dirExists())
-			throw new Exception('The module [' . $this->module->def['id'] . '] is already installed.');
-	}
-	
-	public function requireInstalled() {
-		if (!$this->dirExists())
-			throw new Exception('The module [' . $this->module->def['id'] . '] is not installed.');
-	}
-	
-	public function svnCheckout($access) {
-		$config = SimpleSAML_Configuration::getConfig('config.php');
-		$basedir = $config->getBaseDir();
-		$cmd = "svn co " . escapeshellarg($access['url']) . " " . $basedir . "modules/" . $this->module->def['id'];
-		self::exec($cmd);
-	}
-	
-	public function svnUpdate($access) {
-		$config = SimpleSAML_Configuration::getConfig('config.php');
-		$basedir = $config->getBaseDir();
-		$cmd = "svn up " . $basedir . "modules/" . $this->module->def['id'];
-		self::exec($cmd);
-	}
-	
-	public function removeModuleDir($access) {
-		$config = SimpleSAML_Configuration::getConfig('config.php');
-		$basedir = $config->getBaseDir();
-		$cmd = "rm -rf " . $basedir . "modules/" . $this->module->def['id'];
-		self::exec($cmd);
-	}
-	
-	public function enable() {
-		$config = SimpleSAML_Configuration::getConfig('config.php');
-		$basedir = $config->getBaseDir();
-		
-		$this->requireInstalled();
-		
-		$cmd = "touch " . $basedir . "modules/" . $this->module->def['id'] . '/enable';
-		self::exec($cmd);
-	}
-	
-	public function prepareConfig() {
-		$config = SimpleSAML_Configuration::getConfig('config.php');
-		$basedir = $config->getBaseDir();
-		
-		$this->requireInstalled();
-		
-		$dir = $basedir . "modules/" . $this->module->def['id'] . '/config-templates';
-		if (!file_exists($dir)) return;
-		
-		$files = scandir($dir);
-		foreach($files AS $file) {
-			if(!preg_match('|^.*\.php|', $file)) continue;
-			
-			if (file_exists($basedir . 'config/' . $file)) {
-				echo "Configuration file [" . $file . "] already exists. Will not overwrite existing file.\n";
-				continue;
-			}
-			
-			$cmd = 'cp ' . $dir . '/' . $file . ' ' . $basedir . 'config/';
-			self::exec($cmd);	
-		}
-	}
-	
-	public function zipLoad($access) {
-		$config = SimpleSAML_Configuration::getConfig('config.php');
-		$basedir = $config->getBaseDir();
-		
-		$zipfile = $access['url'];
-		$localfile = tempnam(sys_get_temp_dir(), 'ssp-module-');
-		$filecontents = file_get_contents($zipfile);
-		file_put_contents($localfile, $filecontents);
-		
-		$cmd = "unzip -qo " . escapeshellarg($localfile) . " -d " . $basedir . "modules/";
-		self::exec($cmd);
-
-	}
-	
-}
\ No newline at end of file