On 04/09/2011 12:02, Matthew Seaman wrote:
On 04/09/2011 11:05, Richard Collyer wrote:
I was trying to get CUPS working last night and installed
gutenprint-cups but the make failed half way through - managed to get
the printer working without it so no longer need it. As a result its
installed a fair number of packaged (mostly X11 related) that I don't
need on this headless server so I'd like to tidy them up.

Is there a way of finding out what date/order ports have been installed
or is the output that is sent over ssh logged anywhere so I can trace
back and find out what packages I need to nerf.
Look at the file modification times in the directories under /var/db/pkg
-- that will tell you the last time the port was updated or installed.

Note: you can't rely on the modification time of the port directory
itself.  Tools like portmaster(1) will create additional files within
the directory, which affects that timestamp.  An example -- choosing one
of my installed ports pretty much arbitrarily:

lucid-nonsense:/var/db/pkg:% ls -la postgresql-client-9.0.4_1/
total 107
-rw-r--r--    1 root  wheel      29 Jun 11 23:22 +COMMENT
-rw-r--r--    1 root  wheel  112912 Jul  9 10:23 +CONTENTS
-rw-r--r--    1 root  wheel    1282 Jun 11 23:22 +DESC
-rw-r--r--    1 root  wheel     831 Jun 11 23:22 +DISPLAY
-rw-r--r--    1 root  wheel   17550 Jun 11 23:22 +MTREE_DIRS
-rw-r--r--    1 root  wheel     771 Sep  3 09:19 +REQUIRED_BY
drwxr-xr-x    2 root  wheel       8 Sep  3 09:19 ./
drwxr-xr-x  377 root  wheel     377 Sep  3 09:22 ../

You can see that there are 3 different dates here:

    Sept 3rd at 09:19 -- this is the last time I ran portmaster to
       update my ports.  Note that its the +REQUIRED_BY file that
       has been updated.  One of the ports that requires
       postgresql-client was updated then.

    Jul 11 at 23:22 -- most of the files were modified at this
       time, and it is in fact when I last updated postgresql-client
       on that machine.

    Jul 9 at 10:23 -- +CONTENTS is a few days older than the other
       files.  This is because I installed postgresql-client from a
       package I'd built in a separate jail a slightly earlier.  This
       is the date the package was built.

Therefore, in order to see the packages installed during your abortive
attempt to deal with gutenprint-cups, try:

     # cd /usr/ports/packages
     # ls -lrt */+COMMENT

That will list all your installed ports in order of the last time they
were updated, most recent ones last.  You should be able to identify the
appropriate date range and work from there.

        Cheers,

        Matthew

Thanks Matthew you are a star.

Just incase anyone else reads this for a solution I think the cd /usr/ports/packages line near the bottom was a typo and should have been /var/db/pkg which confused me for a while as I wasn't getting any packages listed using the first dir.

Many thanks for the help,
Richard



__________ Information from ESET NOD32 Antivirus, version of virus signature 
database 6434 (20110903) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com


_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to