Solved Both worlds exist, pkg_* and pkg * (pkg and pkgng)

Hi all!

I've installed the new package-system, ports-mgmt/pkg as it should (I think). I ran pkg2ng afterwards, to convert the old database and started to use this new system. Since this, I have updated all packages many times. I'm running the 1.4.0 version.

I created the /usr/local/etc/pkg/repos/FreeBSD.conf with this content:
Code:
FreeBSD: {
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
  mirror_type: "srv",
  enabled: yes
}

The /usr/local/etc/pkg.conf isn't used and is called /usr/local/etc/pkg.conf.old. This was what I found when installing the PKGNG. I think that was a maneuver from one version to a newer version.

Today I set[]up a OpenVAS and scanned my server. Some of the scans showed that the old package-system (pkg_*) is still there and all of the old packages in some database. I checked the /var/db/pkg/ and saw all the old packages. I tried to find were all the new stuff was placed, and I think that's in /var/db/cache/pkg/. The new packages is the one that is active on host and running.

Now comes the tricky part and the thing I need tips, ideas and help around. How can the old database and data be left and how do I erase, convert, delete or solve this? I want only the new package system on the server. Did I miss some info when installing the new and is /usr/local/etc/pkg.conf needed with some configuration within? Can I convert the new database to the old? I don't need or want both worlds.

Code:
# pkg -vv
Version                 : 1.4.0
PKG_DBDIR = "/var/db/pkg";
PKG_CACHEDIR = "/var/cache/pkg";
PORTSDIR = "/usr/ports";
INDEXDIR = "";
INDEXFILE = "INDEX-9";
HANDLE_RC_SCRIPTS = false;
ASSUME_ALWAYS_YES = false;
REPOS_DIR [
    "/etc/pkg/",
    "/usr/local/etc/pkg/repos/",
]
PLIST_KEYWORDS_DIR = "";
SYSLOG = true;
ABI = "FreeBSD:9:amd64";
ALTABI = "freebsd:9:x86:64";
DEVELOPER_MODE = false;
VULNXML_SITE = "http://vuxml.freebsd.org/freebsd/vuln.xml.bz2";
FETCH_RETRY = 3;
PKG_PLUGINS_DIR = "/usr/local/lib/pkg/";
PKG_ENABLE_PLUGINS = true;
PLUGINS [
]
DEBUG_SCRIPTS = false;
PLUGINS_CONF_DIR = "/usr/local/etc/pkg/";
PERMISSIVE = false;
REPO_AUTOUPDATE = true;
NAMESERVER = "";
EVENT_PIPE = "";
FETCH_TIMEOUT = 30;
UNSET_TIMESTAMP = false;
SSH_RESTRICT_DIR = "";
PKG_ENV {
}
PKG_SSH_ARGS = "";
DEBUG_LEVEL = 0;
ALIAS {
}
CUDF_SOLVER = "";
SAT_SOLVER = "";
RUN_SCRIPTS = true;
CASE_SENSITIVE_MATCH = false;
LOCK_WAIT = 1;
LOCK_RETRIES = 5;
SQLITE_PROFILE = false;
WORKERS_COUNT = 0;
READ_LOCK = false;
PLIST_ACCEPT_DIRECTORIES = false;
IP_VERSION = 0;
AUTOMERGE = true;
VERSION_SOURCE = "";


Repositories:
  FreeBSD: {
    url             : "pkg+http://pkg.FreeBSD.org/FreeBSD:9:amd64/latest",
    enabled         : yes,
    mirror_type     : "SRV"
  }
Best J
 
Unless you delete them, the old pkg_* commands and the old database subdirectories in /var/db/pkg will stay there. The new database is in a SQLite database, /var/db/pkg/local.sqlite.

The old files can just be ignored. Just do not use them any more, and ignore any outdated utilities that pay attention to them.
 
Thanks wblock@!

I would have scratched my head hairless and still haven't had a clue. It's so wonderful to have you "guys" at this forum at reach. I will probably delete my old packages and leave the old commands.
Best J
 
The old packages are already gone. All that is left is the old database files and the pkg_* programs, which should not be used.
 
If you want to get rid of the old packaging tools on FreeBSD 8 and 9 you can compile world from source with WITHOUT_PKGTOOLS set in src.conf(5). When you do make delete-old after installing world the old packaging tools are then deleted.
 
Back
Top