diff --git a/bin/is b/bin/is
index 1abf180ff575ff975140ab0232113ddd52bc1551..b8b834b12d84ebeb30846e3f0846114f353d63b7 100755
--- a/bin/is
+++ b/bin/is
@@ -75,19 +75,11 @@ def c_build(parser, args):
 
 def c_init(parser, args):
     '''
-    Create a empty repository
+    Create an empty repository
     '''
-    # we cannot use load_repositories because repo doesn't exists
-    if args.repo_path is not None:
-        # from command line
-        Repository.create(RepositoryConfig(None, path=args.repo_path))
-    else:
-        # from config
-        for repoconf in RepoConfigFile(args.repo_config).repos:
-            # filtering on repository name if present
-            if args.repo_filter is not None and repoconf.name != args.repo_filter:
-                continue
-            Repository.create(repoconf)
+    repoman = load_repositories(args)
+    for reponame in args.repository:
+        repoman[reponame].init()
 
 def c_add(parser, args):
     '''
@@ -314,8 +306,8 @@ p_build.set_defaults(func=c_build)
 
 # init command parser
 p_init = subparsers.add_parser("init", help=c_init.__doc__.lower())
-p_init.add_argument("repo_filter", nargs="?", default=argparse.SUPPRESS,
-                    help="Name or path of a repository to init")
+p_init.add_argument("repository", nargs="+",
+                    help="repository's name to initialize")
 p_init.set_defaults(func=c_init)
 
 # add command parser
diff --git a/installsystems/database.py b/installsystems/database.py
index 3722afe94746df73aafb1a433d38236ced5de2de..8bb13b2066f6934155a31d65180ea1c5b9af1deb 100644
--- a/installsystems/database.py
+++ b/installsystems/database.py
@@ -26,7 +26,7 @@ class Database(object):
         arrow("Creating repository database")
         # check locality
         if istools.pathtype(path) != "file":
-            raise NotImplementedError("Database creation must be local")
+            raise Exception("Database creation must be local")
         path = os.path.abspath(path)
         if os.path.exists(path):
             raise Exception("Database already exists. Remove it before")
@@ -43,7 +43,7 @@ class Database(object):
     def __init__(self, path):
         # check locality
         if istools.pathtype(path) != "file":
-            raise NotImplementedError("Database creation must be local")
+            raise Exception("Database must be local")
         self.path = os.path.abspath(path)
         self.conn = sqlite3.connect(self.path, isolation_level=None)
         self.conn.execute("PRAGMA foreign_keys = ON")
diff --git a/installsystems/repository.py b/installsystems/repository.py
index 9a998fffe95baa0fd1961e428d8a3c3a68fc1c99..d268dc207f37e2935ec53c44e37eb90685b20d75 100644
--- a/installsystems/repository.py
+++ b/installsystems/repository.py
@@ -26,15 +26,34 @@ class Repository(object):
 
     def __init__(self, config):
         self.config = config
-        self.db = Database(config.dbpath)
+        try:
+            self.db = Database(config.dbpath)
+        except:
+            self.db = None
+
+    def __getattribute__(self, name):
+        '''
+        Raise an error if repository is unavailable
+        Unavailable can be caused because db is not accessible or
+        because repository is not initialized
+        '''
+        db = object.__getattribute__(self, "db")
+        config = object.__getattribute__(self, "config")
+        # config and init are always accessible
+        if name in ("init", "config"):
+            return object.__getattribute__(self, name)
+        # if no db (not init or not accessible) raise error
+        if db is None:
+            raise Exception("Repository %s is not availabe" % config.name)
+        return object.__getattribute__(self, name)
 
-    @classmethod
-    def create(cls, config):
+    def init(self):
         '''
-        Create an empty base repository
+        Initialize an empty base repository
         '''
+        config = self.config
         # check local repository
-        if istools.pathtype(config.path) != "file":
+        if not istools.isfile(self.config.path):
             raise Exception("Repository creation must be local")
         # create base directories
         arrow("Creating base directories")
@@ -50,13 +69,13 @@ class Repository(object):
             raise Exception("Unable to create directory %s: %s" % (config.path, e))
         arrowlevel(-1)
         # create database
-        dbpath = os.path.join(config.path, config.dbname)
-        d = Database.create(dbpath)
-        istools.chrights(dbpath, uid=config.uid, gid=config.gid, mode=config.fmod)
-        # create last file
-        self = cls(config)
+        d = Database.create(config.dbpath)
+        istools.chrights(config.dbpath, uid=config.uid,
+                         gid=config.gid, mode=config.fmod)
+        # load database
+        self.db = Database(config.dbpath)
+        # create/update last file
         self.update_last()
-        return self
 
     def update_last(self):
         '''