From owner-freebsd-questions@FreeBSD.ORG Mon Sep 24 13:13:23 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D35F16A419 for ; Mon, 24 Sep 2007 13:13:23 +0000 (UTC) (envelope-from mlt01+OU=159a59ab@mlists.homeunix.com) Received: from turtle-out.mxes.net (turtle-out.mxes.net [216.86.168.191]) by mx1.freebsd.org (Postfix) with ESMTP id CA79A13C45A for ; Mon, 24 Sep 2007 13:13:22 +0000 (UTC) (envelope-from mlt01+OU=159a59ab@mlists.homeunix.com) Received: from mxout-03.mxes.net (mxout-03.mxes.net [216.86.168.178]) by turtle-in.mxes.net (Postfix) with ESMTP id E53E710583 for ; Mon, 24 Sep 2007 08:40:45 -0400 (EDT) Received: from gumby.homeunix.com. (unknown [87.81.140.128]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTP id 62B3A51931 for ; Mon, 24 Sep 2007 08:40:44 -0400 (EDT) Date: Mon, 24 Sep 2007 13:40:41 +0100 From: RW To: freebsd-questions@freebsd.org Message-ID: <20070924134041.1d7bfb69@gumby.homeunix.com.> In-Reply-To: <1190636701.2907.3.camel@viola.izb.knu.ac.kr> References: <38b9f0350709240517x5d6f976fn9fb2f76105dc51e6@mail.gmail.com> <1190636701.2907.3.camel@viola.izb.knu.ac.kr> X-Mailer: Claws Mail 3.0.0 (GTK+ 2.10.14; i386-portbld-freebsd6.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: The best way to keep the system clean? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Sep 2007 13:13:23 -0000 On Mon, 24 Sep 2007 21:25:01 +0900 Byung-Hee HWANG wrote: > On Mon, 2007-09-24 at 20:17 +0800, ronggui wrote: > > My problem, many times I install some software from ports, it > > install the dependency software. Then after some time, I find that > > software isn't what I want, and deinstall it. At this point, the > > dependency software isn't necessary as well. Is there a way to > > clean them automatically, like the apt-get autoremove in the Ubuntu > > system. > > > > > The best way is using -RELEASE anytime. That's enough to me. If I need > to install/deinstall, I use pkg_add/pkg_delete. It's just my opinion. That doesn't remove unwanted dependencies, which is what the question was about. Try ports-mgmt/pkg_cutleaves or, if you have portmanager installed look at the -slid option. > > And the related general question is, what's the best way to keep my > > system clean? Thanks. Another important tool is portsclean (installed with portupgrade), which cleans-out obsolete distfiles, packages, and build directories. Also look at the options in /etc/defaults/periodic.conf and /etc/defaults/rc.conf which contain some useful scripts for automatically deleting things.