DaemonForums  

Go Back   DaemonForums > NetBSD > NetBSD Installation and Upgrading

NetBSD Installation and Upgrading Have trouble getting NetBSD on your toaster?

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 23rd March 2009
dsp dsp is offline
New User
 
Join Date: Mar 2009
Posts: 2
Thanked 0 Times in 0 Posts
Default how to remove games and mail in netbsd

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..
Reply With Quote
  #2   (View Single Post)  
Old 23rd March 2009
Oko's Avatar
Oko Oko is offline
Fsck Surgeon
 
Join Date: May 2008
Location: Kosovo, Serbia
Posts: 764
Thanked 36 Times in 32 Posts
Default

Quote:
Originally Posted by dsp View Post
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..
I do not use NetBSD but I do not think it is that simple to remove things you are talking about.

The easiest way is not to have them on the first place i.e. to chose minimal installation during your original installation. NetBSD base does NOT include X and most of the stuff you want to get a rid from.
There is also plenty of documents scattered all over the net how you can trim down further even NetBSD minimal installation to fit something of order 10MB.
Reply With Quote
  #3   (View Single Post)  
Old 23rd March 2009
dsp dsp is offline
New User
 
Join Date: Mar 2009
Posts: 2
Thanked 0 Times in 0 Posts
Default remove

Quote:
Originally Posted by Oko View Post
I do not use NetBSD but I do not think it is that simple to remove things you are talking about.

The easiest way is not to have them on the first place i.e. to chose minimal installation during your original installation. NetBSD base does NOT include X and most of the stuff you want to get a rid from.
There is also plenty of documents scattered all over the net how you can trim down further even NetBSD minimal installation to fit something of order 10MB.
Thank you. Yes, it was the first thing that came into mind, however, it took me ages to do another netbsd base installation, because the processor is waaaay tooo old.. so i was just thinking to remove several unusefull applications.. Need an advice from an experienced netbsd users..
Reply With Quote
  #4   (View Single Post)  
Old 25th March 2009
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 3,140
Thanked 182 Times in 149 Posts
Default

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
If you want to remove all files
Code:
# tar tzf games.tgz | xargs rm -f
If you want to keep some files, redirect the listing to file and use sed to prepend a # rm -f command.
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
Remove the "#" from the files you want to delete, save it and execute it
Code:
# sh ./rm-candidates.sh
If you want to delete most of the files it may be easier not to have sed prepend the "#" and just insert it for the few files you want to delete
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
Reply With Quote
  #5   (View Single Post)  
Old 26th March 2009
fbsduser fbsduser is offline
Shell Scout
 
Join Date: Aug 2008
Posts: 103
Thanked 4 Times in 4 Posts
Default

Doesn't pkg-src have a tool to remove packages?
Reply With Quote
  #6   (View Single Post)  
Old 26th March 2009
Oko's Avatar
Oko Oko is offline
Fsck Surgeon
 
Join Date: May 2008
Location: Kosovo, Serbia
Posts: 764
Thanked 36 Times in 32 Posts
Default

Quote:
Originally Posted by fbsduser View Post
Doesn't pkg-src have a tool to remove packages?
Of course it does but he is trying to remove the things from the base of
the system. Read his question carefully. By the way he did get fully qualified answer from a long time NetBSD user.
Reply With Quote
  #7   (View Single Post)  
Old 26th March 2009
fbsduser fbsduser is offline
Shell Scout
 
Join Date: Aug 2008
Posts: 103
Thanked 4 Times in 4 Posts
Default

Quote:
Originally Posted by Oko View Post
Of course it does but he is trying to remove the things from the base of
the system. Read his question carefully. By the way he did get fully qualified answer from a long time NetBSD user.
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).
Reply With Quote
  #8   (View Single Post)  
Old 26th March 2009
JMJ_coder JMJ_coder is offline
VPN Cryptographer
 
Join Date: May 2008
Posts: 464
Thanked 8 Times in 8 Posts
Default

Quote:
Originally Posted by dsp View Post
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..
Seeing how you said that apache-php and asterisk are installed, I'm assuming that you have pkgsrc installed. That is pushing it with 1 GB of disk space. I tried it once with an old hard drive (~1-1.2 GB) and I was fighting tooth and nail for everything to fit.

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)
Reply With Quote
  #9   (View Single Post)  
Old 26th March 2009
J65nko J65nko is offline
Administrator
 
Join Date: May 2008
Location: Budel - the Netherlands
Posts: 3,140
Thanked 182 Times in 149 Posts
Default

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
Reply With Quote
Old 27th March 2009
Oko's Avatar
Oko Oko is offline
Fsck Surgeon
 
Join Date: May 2008
Location: Kosovo, Serbia
Posts: 764
Thanked 36 Times in 32 Posts
Default

Quote:
Originally Posted by JMJ_coder View Post
Seeing how you said that apache-php and asterisk are installed, I'm assuming that you have pkgsrc installed. That is pushing it with 1 GB of disk space. I tried it once with an old hard drive (~1-1.2 GB) and I was fighting tooth and nail for everything to fit.

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.
Maybe he just installed binaries from the different machine which has
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.
Reply With Quote
Old 16th June 2009
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 555
Thanked 14 Times in 13 Posts
Default

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}
So my plan is to archive these, remove them and install the sendmail package.

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
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
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
How to remove a word and everything after? bigb89 Programming 4 18th November 2008 02:24 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


All times are GMT. The time now is 02:10 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick