![]() |
|
NetBSD Installation and Upgrading Have trouble getting NetBSD on your toaster? |
![]() |
|
Thread Tools | Display Modes |
|
|||
![]()
hi all,
I am currently only need several basic applications for my box (basically : asterisk,apache-php,ssh) . However, i somehow running out of 1 Giga of my compact flash because the base installation in netbsd includes some softwares that I occasionally use Does any of you could guide me to remove (uninstall) several softwares such as games,mail, x-window ? (it is not as simple as just by rm - rf from the /usr/games isn't it?) Thanks a lot guys.. |
|
|||
![]() Quote:
|
|
|||
![]()
You can use tar to remove files installed from a NetBSD binary install set.
First view the files Code:
$ tar tzf games.tgz | less ./etc/mtree/set.games ./usr/games/adventure ./usr/games/arithmetic ./usr/games/atc ./usr/games/backgammon ./usr/games/teachgammon ./usr/games/banner ./usr/games/battlestar ./usr/games/bcd ./usr/games/boggle ./usr/games/caesar [snip] ./usr/share/man/man8/dm.8 ./usr/share/man/man8/strfile.8 ./var/games/hackdir/data ./var/games/hackdir/help ./var/games/hackdir/hh ./var/games/hackdir/perm ./var/games/phantasia/gold ./var/games/phantasia/lastdead ./var/games/phantasia/mess ./var/games/phantasia/monsters ./var/games/phantasia/motd ./var/games/phantasia/void Code:
# tar tzf games.tgz | xargs rm -f Code:
# tar tzf games.tgz | sed -e 's/^/# rm -f /' >rm-candidates.sh # head -10 rm-candidates.sh # rm -f ./etc/mtree/set.games # rm -f ./usr/games/adventure # rm -f ./usr/games/arithmetic # rm -f ./usr/games/atc # rm -f ./usr/games/backgammon # rm -f ./usr/games/teachgammon # rm -f ./usr/games/banner # rm -f ./usr/games/battlestar # rm -f ./usr/games/bcd # rm -f ./usr/games/boggle Code:
# sh ./rm-candidates.sh Code:
$ tar tzf games.tgz | sed -e 's/^/rm -f /' | head -10 rm -f ./etc/mtree/set.games rm -f ./usr/games/adventure rm -f ./usr/games/arithmetic rm -f ./usr/games/atc rm -f ./usr/games/backgammon rm -f ./usr/games/teachgammon rm -f ./usr/games/banner rm -f ./usr/games/battlestar rm -f ./usr/games/bcd rm -f ./usr/games/boggle
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|||
![]()
Doesn't pkg-src have a tool to remove packages?
|
|
|||
![]()
Oops. I guess I though about the wrong *BSD (I was thinking FreeBSD where the games and netowrking stuff are separate dist-packages from the base one).
|
|
|||
![]() Quote:
The base installation itself is less than 500MB, but pkgsrc is over 500MB (2008Q4 is reading 612 MB). When you go to install a package, you are adding to that tally by storing all the working files. You won't gain much by removing games - they only take up less than 5 MB of space.
__________________
And the WORD was made flesh, and dwelt among us. (John 1:14) |
|
|||
![]()
I just used the "games" installation set as example. You can use the same procedures for removing the X Window installation sets.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
||||
![]() Quote:
bigger HDD. If I am not mistaken you can also compile individual packages without snapping whole pkgsrc DryLavin in BSD Hacks talks about it. Finally probably the biggest cost saving thing is actually leaving out compiler itself. I think that GCC is about 200Mb. |
|
||||
![]()
dsp also asked about removing mail (postfix). Since it doesn't have its own install set (like games or X do) in the base, it's a bit trickier. I've been looking at removing postfix also, to replace with sendmail, and thought I'd post what I came up with so far.
First, there are a couple of postfix precompiled packages available. If you look at them (with tar -tzf) you get some idea of all the files involved, but the actual directories won't be exactly what you see in the .tgz file. Second, I noticed the file /etc/postfix/postfix-files. This gives a pretty good list of what's involved once you decipher what all the variables (such as $data_directory, etc.) are. Having done that (hopefully), this is a summary of what the base postfix seems to consist of: Code:
* 6 directories which end in "/postfix", /etc/postfix /var/db/postfix /usr/libexec/postfix /var/spool/postfix /usr/share/examples/postfix /usr/share/doc/html/postfix * 3 symlinks, /usr/sbin/sendmail /usr/bin/mailq /usr/bin/newaliases * a bunch of post* files in the $command_directory, /usr/sbin/postalias /usr/sbin/postcat /usr/sbin/postconf /usr/sbin/postfix /usr/sbin/postkick /usr/sbin/postlock /usr/sbin/postlog /usr/sbin/postmap /usr/sbin/postsuper /usr/sbin/postdrop /usr/sbin/postqueue ADDED: * selected man pages in /usr/share/man/man{1,5,8} Please note I haven't gone ahead and done this yet, so if anyone wants to follow this info don't blame me! ![]() One concern will be the next NetBSD upgrade. Postfix will be put back in and this *might* trash sendmail, mailq and newaliases, so I'd have to remember to save these before upgrading and restore them after removing the upgraded postfix, if necessary. Any comments on potential gotcha's, ommissions etc. would be welcome. Last edited by IdOp; 18th June 2009 at 04:16 PM. Reason: rm dup dir. // man pages |
![]() |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to remove a word and everything after? | bigb89 | Programming | 7 | 31st August 2014 01:47 AM |
your 3 favorite games | welkin | FreeBSD Ports and Packages | 17 | 5th June 2010 08:26 PM |
How to remove Gnome and X | Malakim | Solaris | 2 | 12th April 2009 12:10 PM |
Problem with no sound in games | troberts | FreeBSD General | 9 | 21st July 2008 08:53 PM |
CrossOver Games for BSD | udragon | FreeBSD General | 6 | 27th May 2008 08:59 AM |