From owner-freebsd-questions@FreeBSD.ORG Sun Jun 14 15:08:48 2009 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 D3C121065673 for ; Sun, 14 Jun 2009 15:08:48 +0000 (UTC) (envelope-from sonicy@otenet.gr) Received: from kane.otenet.gr (kane.otenet.gr [83.235.67.31]) by mx1.freebsd.org (Postfix) with ESMTP id 59EE58FC0A for ; Sun, 14 Jun 2009 15:08:47 +0000 (UTC) (envelope-from sonicy@otenet.gr) Received: from atomic.dyndns.org (athedsl-4468804.home.otenet.gr [94.71.112.52]) by kane.otenet.gr (8.13.8/8.13.8/Debian-3) with ESMTP id n5EF8hBh015397; Sun, 14 Jun 2009 18:08:43 +0300 Message-ID: <4A35127A.2090708@otenet.gr> Date: Sun, 14 Jun 2009 18:08:42 +0300 From: Manolis Kiagias User-Agent: Thunderbird 2.0.0.21 (X11/20090414) MIME-Version: 1.0 To: Pieter de Goeje References: <4096aedd0906140558x5ad1b562h2c43a0b36051a40e@mail.gmail.com> <200906141605.45421.pieter@degoeje.nl> In-Reply-To: <200906141605.45421.pieter@degoeje.nl> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: what is the best way to remove a program? 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: Sun, 14 Jun 2009 15:08:49 -0000 Pieter de Goeje wrote: > On Sunday 14 June 2009 14:58:46 Mark Hartkemeyer wrote: > >> I was installing the mysql51-server port and I had a message that the >> install could not proceed, because mysql50-client was already >> installed. I simply ran a "cd" and then a "make deinstall" in the >> mysql50-client directory. Is this is the best way to remove a >> program? Does it depend on how the program was added (compiled versus >> prebuilt binary added with pkg_add -r)? I've tried pkg_delete in the >> past, but it seems to always complain about dependencies and not >> actually remove the program. >> >> Thanks, >> Mark Hartkemeyer >> > > "make deinstall" is a good way to remove a program, but it ignores > dependencies as you discovered. Some other program on your system requires > mysql50-client to function and might now be broken. > pkg_delete -f does basically the same. pkg_deinstall (which comes with > portupgrade) also does the trick. > > Before doing a "make deinstall" you can check which installed packages require > it by: > pkg_info -Rx mysql-client > > If you want to upgrade mysql-client from 5.0 to 5.1, use portupgrade: > portupgrade -rf -o databases/mysql51-client mysql-client > > This will replace mysql50-client with mysql51-client and reinstall all ports > depending on mysql50-client ("-rf"), so they will use the new version. In this > case the last step probably isn't necessary because the libraries are (mostly > I think) compatible, but in general it is recommended. > > For more information, see "man ports" and "man portupgrade". > > For an easy interactive program that takes care of dependencies, I would suggest ports-mgmt/pkg_rmleaves