From owner-freebsd-questions@FreeBSD.ORG Sun Jan 21 16:19:52 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BCE0B16A405 for ; Sun, 21 Jan 2007 16:19:52 +0000 (UTC) (envelope-from carpetsmoker@carpetsmoker.net) Received: from glitch.carpetsmoker.net (carpetsmoker.xs4all.nl [82.93.23.199]) by mx1.freebsd.org (Postfix) with ESMTP id 775FC13C442 for ; Sun, 21 Jan 2007 16:19:52 +0000 (UTC) (envelope-from carpetsmoker@carpetsmoker.net) Received: by glitch.carpetsmoker.net (Postfix, from userid 1001) id B83D8B839; Sun, 21 Jan 2007 17:19:53 +0100 (CET) Date: Sun, 21 Jan 2007 17:19:53 +0100 From: Martin Tournoij To: freebsd-questions@freebsd.org Message-ID: <20070121161952.GB8354@glitch.carpetsmoker.net> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: mutt-ng/devel-r804 (FreeBSD) Subject: Re: Remove extra packages and streamline 6.2 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, 21 Jan 2007 16:19:52 -0000 On Sat, Jan 20, 2007 at 09:15:34PM -0500, Joshua Lewis wrote: > Hello list, > > After many days of hard work, a lot of caffeine and not nearly enough sleep I have a working > asterisk PBX for my home. > > I have it working on a PIII 800 with 512MB of RAM and two 5GB drives in a Raid1 config. While this > system should suffice I would like to streamline the system a little. > > I installed a lot of unnecessary applications during sysisntall. Is there a way to figure out what > software I don't need. I did a pkg_info | wc -l and found that I have 63 apps installed. I know I > don't need a bunch of these but I am afraid to delete random packages. After having a non working > phone for two weeks my wife would kill me if I messed it all up again. > > Any ways I know I don't need xorg any more. I installed it so I could use gastman to try and get my > Asterisk config working faster. I never wound up using gastman so now I need to remove it and xorg. > But there are a bunch of fonts and docs and things. > > Is it possible to remove any packages I have not used for X amount of days? > > Is there some way to figure out what apps I don't need installed anymore? > > Are there any other ways to streamline a system? > > I removed everything from rc.conf except the basics. Hostname, defualtrouter, ifconfig, keyrate, > linux_enable, saver, sshd, asterisk. > > Here is what I have installed. > > [PKG_INFO SNIP] > > > Sincerely, > Joshua Lewis > joshua.lewis@familyfunzone.net You can use stat to see when a file was last accessed, for example, on my system stat -x /usr/local/bin/7z show (among other things): Access: Mon Jan 15 00:34:11 2007 So, I last used 7z on jan 15th, at 00:34. I suppose you could write a script to automatically remove packages which haven't been used for a X amount of time, but I would not recommend doing this, because you might accidentally remove a package you don't want to remove. Examples would be dos2unix, antiword, 7zip, packges you might not use a lot, but sure come in handy at times! Also, it would require quite some work, probably more work than you'll save. Another hint may be this: pkg_info -adrR > PKGINFO This will generate a list of all your installed packages including dependency's and a description (from pkg-descr) Drop the -d flag if you don't want descriptions.