Question about Installed Packages

Matthew Seaman matthew at FreeBSD.org
Thu Oct 20 06:35:55 UTC 2016


On 20/10/2016 06:46, Allen wrote:
> I've been using pkg to install the things I want installed, and I'm
> wondering if there's a way, which I'm sure there is, to make a list of
> all the Packages that I've installed since first installing my OS.

Well, you can see all the packages installed on your system by:

  % pkg info

If you want to see the files installed by one package:

  % pkg info -l pkgname

You can see all the packages you specifically requested to install --
ie. rather than packages that were automatically installed to fulfil
dependencies by:

  % pkg query -e '%a==0' %n-%v

If you want to see all the packages you ever installed, but may have
subsequently deleted, or see what happened each time you ran 'pkg
update' -- unfortunately, pkg(8) does not keep logs in that degree of
detail.  You'ld have to look at the system logs for that, but unless
you've made special arrangements to keep older logs around, you'ld only
have a few weeks worth of those available.

> I'm planning on upgrading my OS to a new version at some point as I'm
> using an older version right now, and I already purchased 10.3 on DVD,
> and whenever I install FreeBSD, I end up spending DAYS on the Web Site
> looking on the Ports Collection to see what I want to install, and so
> every time I get my machine how I want it, if I go to do a fresh
> install which is what I normally enjoy doing, most of the time, but I'd
> like to be able to have that list so I could just look at it and then
> install whatever I want.

If you're upgrading from 10.1-RELEASE to 10.3-RELEASE you *don't* need
to reinstall all your ports.  You can just upgrade the OS in-place --
see freebsd-update(8) and update your ports via 'pkg upgrade'.  You only
need to reinstall ports on a major version update, eg. 10.3-RELEASE to
11.0-RELEASE.

	Matthew

PS. The freebsd-questions at freebsd.org would make a better venue for
asking questions at this level.  freebsd-pkg@ is more about developing
pkg itself.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 931 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-pkg/attachments/20161020/0953c246/attachment.sig>


More information about the freebsd-pkg mailing list