remove x* and games from my system

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

remove x* and games from my system

Dan Liu-2
At first I install all the packages from the install43.iso except bsd.mp.
Because I run openbsd on my virtualbox,I can not start X.
I just test openbsd to use as a postfix server,so I want to remove all
the x* and games.
I use the port(src,port).
Could some one help me.I am a green hand here.

Reply | Threaded
Open this post in threaded view
|

Re: remove x* and games from my system

Josh Grosse
On Wed, 28 May 2008 00:42:44 +0800, Dan Liu wrote
> At first I install all the packages from the install43.iso except bsd.mp.
> Because I run openbsd on my virtualbox,I can not start X.
> I just test openbsd to use as a postfix server,so I want to remove
> all the x* and games. I use the port(src,port). Could some one help
> me.I am a green hand here.

This may be done manually.

For each fileset, obtain a list of files and remove them:  e.g.:

   # cd /
   # tar tzf /path/to/game43.tgz | xargs rm
   # tar tzf /path/to/xbase43.tgz | xargs rm

and so on.

Reply | Threaded
Open this post in threaded view
|

Re: remove x* and games from my system

Aaron Stellman
In reply to this post by Dan Liu-2
On Wed, May 28, 2008 at 12:42:44AM +0800, Dan Liu wrote:
> At first I install all the packages from the install43.iso except bsd.mp.
> Because I run openbsd on my virtualbox,I can not start X.
> I just test openbsd to use as a postfix server,so I want to remove all
> the x* and games.
> I use the port(src,port).
> Could some one help me.I am a green hand here.
>
You can either go the hard way of looking up where {x*,games} sets
extract their corresponding files (tar tzvf games43.tgz) for example, or you can
simply make a clean install, shouldn't be a problem since you're running
it in virtual environment.

Reply | Threaded
Open this post in threaded view
|

Re: remove x* and games from my system

Travers Buda-2
In reply to this post by Dan Liu-2
* Dan Liu <[hidden email]> [2008-05-28 00:42:44]:

> At first I install all the packages from the install43.iso except bsd.mp.
> Because I run openbsd on my virtualbox,I can not start X.
> I just test openbsd to use as a postfix server,so I want to remove all
> the x* and games.
> I use the port(src,port).
> Could some one help me.I am a green hand here.
>

rm -rf `cat /usr/src/distrib/sets/lists/game/mi`
rm -rf `cat /usr/src/distrib/sets/lists/game/md.YOURMACHINE`
for i in xbase xetc xfond xserv xshare; do rm -rf `cat /usr/xenocara/distrib/sets/lists/$i/mi`; done
for i in xbase xetc xfond xserv xshare; do rm -rf `cat /usr/xenocara/distrib/sets/lists/$i/md.YOURMACHINE`; done

Replace "YOURMACHINE" with your arch... i386.. amd64 whatev. Those are ticks, ``, below the ~ on us layouts. cd into / first.

Otherwise you could do this like... cat /usr/src/distrib/sets/lists/game/mi | xargs rm -rf

--
Travers Buda

Reply | Threaded
Open this post in threaded view
|

Re: remove x* and games from my system

Ingo Schwarze
Caution, bad advice ahead...

Travers Buda wrote on Tue, May 27, 2008 at 12:05:35PM -0500:
> * Dan Liu <[hidden email]> [2008-05-28 00:42:44]:

>> At first I install all the packages from the install43.iso except bsd.mp.

That's good practice for testing stuff (bsd.mp can't do harm, either).

>> Because I run openbsd on my virtualbox,I can not start X.
>> I just test openbsd to use as a postfix server,so I want to remove all
>> the x* and games.

Why, which problem are you trying to solve?
Simply leave them, in particular when you are just testing.
Some unused files cause no harm; some of them might even come
in handy where you least expect they could.
When you try to remove base components without knowing
what you are doing, chances are you break your system.

>> Could some one help me.  I am a green hand here.

Then don't do non-standard stunts until you have learnt the basics.

> for i in xbase xetc xfond xserv xshare; do
>   rm -rf `cat /usr/xenocara/distrib/sets/lists/$i/mi`;

Travers, did you test that on your own machine before posting?
I'm quite fond of your spelling "xfond".

Unless i'm quite mistaken, that's exceptionally terrible advice:

 $ cd /usr/xenocara/distrib/sets/lists/xbase/
 $ cvs status mi | grep Work
   Working revision:    1.19
 $ head -n 1 mi
   ./etc

You don't want to

  rm -rf /etc /usr /var

do you?

> done

Yeah, sort of, indeed.
Granted, your suggestion removes X, too - among others...

Reply | Threaded
Open this post in threaded view
|

Re: remove x* and games from my system

Travers Buda-2
* Ingo Schwarze <[hidden email]> [2008-05-27 22:03:25]:

> Caution, bad advice ahead...
>
> Travers Buda wrote on Tue, May 27, 2008 at 12:05:35PM -0500:
> > * Dan Liu <[hidden email]> [2008-05-28 00:42:44]:
>
> >> At first I install all the packages from the install43.iso except bsd.mp.
>
> That's good practice for testing stuff (bsd.mp can't do harm, either).
>
> >> Because I run openbsd on my virtualbox,I can not start X.
> >> I just test openbsd to use as a postfix server,so I want to remove all
> >> the x* and games.
>
> Why, which problem are you trying to solve?
> Simply leave them, in particular when you are just testing.
> Some unused files cause no harm; some of them might even come
> in handy where you least expect they could.
> When you try to remove base components without knowing
> what you are doing, chances are you break your system.
>
> >> Could some one help me.  I am a green hand here.
>
> Then don't do non-standard stunts until you have learnt the basics.
>
> > for i in xbase xetc xfond xserv xshare; do
> >   rm -rf `cat /usr/xenocara/distrib/sets/lists/$i/mi`;
>
> Travers, did you test that on your own machine before posting?
> I'm quite fond of your spelling "xfond".
>

Clever.  =) Plus its missing a "done" in there.  I _always_ test
crazy rm -rf's.

Using xargs and tar -t (as someone posted) is probably the best
method, short of just re-installing.

*snip

--
Travers Buda

Reply | Threaded
Open this post in threaded view
|

Re: remove x* and games from my system

Stuart Henderson
In reply to this post by Ingo Schwarze
On 2008-05-27, Ingo Schwarze <[hidden email]> wrote:
> Caution, bad advice ahead...
>
>>> I just test openbsd to use as a postfix server,so I want to remove all
>>> the x* and games.
>
> Why, which problem are you trying to solve?
> Simply leave them, in particular when you are just testing.

If you leave the old X libs and includes on the system, make sure they
get upgraded with the rest of the OS, it is likely to bite you sometime
in the future otherwise.

Reply | Threaded
Open this post in threaded view
|

Re: remove x* and games from my system

Stuart Henderson
In reply to this post by Travers Buda-2
On 2008-05-27, Travers Buda <[hidden email]> wrote:
> Using xargs and tar -t (as someone posted) is probably the best
> method, short of just re-installing.

$DEITY no, look at the file list of xbase, for example.

Reply | Threaded
Open this post in threaded view
|

Re: remove x* and games from my system

Travers Buda-2
* Stuart Henderson <[hidden email]> [2008-05-27 21:52:43]:

> On 2008-05-27, Travers Buda <[hidden email]> wrote:
> > Using xargs and tar -t (as someone posted) is probably the best
> > method, short of just re-installing.
>
> $DEITY no, look at the file list of xbase, for example.
>

Err yeah, you're right--very bad idea.

./etc
./etc/X11
./etc/X11/app-defaults
./etc/X11/fs
*snip*.
/usr
./usr/X11R6
./usr/X11R6/README
./usr/X11R6/bin

The tarballs and the lists are this way.  How about just a plain
rm to get the files, then a few passes with rmdir.

--
Travers Buda

Reply | Threaded
Open this post in threaded view
|

Re: remove x* and games from my system

Josh Grosse
On Tue, May 27, 2008 at 05:50:53PM -0500, Travers Buda wrote:

> * Stuart Henderson <[hidden email]> [2008-05-27 21:52:43]:
>
> > On 2008-05-27, Travers Buda <[hidden email]> wrote:
> > > Using xargs and tar -t (as someone posted) is probably the best
> > > method, short of just re-installing.
> >
> > $DEITY no, look at the file list of xbase, for example.
> >
>
> Err yeah, you're right--very bad idea.
>
> ./etc
> ./etc/X11
> ./etc/X11/app-defaults

My recommendation was plain rm, without -rf.  Viz:

   # cd /
   # tar tzf /path/to/xbase43.tgz | xargs rm

I believe it to be safe.  It will leave some directories in place, but won't
remove anything it's not supposed to.

In any case, for a test system as the OP has, reinstalling is probably faster
and easier.

Reply | Threaded
Open this post in threaded view
|

Re: remove x* and games from my system

Bryan Irvine
In reply to this post by Stuart Henderson
On Tue, May 27, 2008 at 2:52 PM, Stuart Henderson <[hidden email]>
wrote:

> On 2008-05-27, Travers Buda <[hidden email]> wrote:
> > Using xargs and tar -t (as someone posted) is probably the best
> > method, short of just re-installing.
>
> $DEITY no, look at the file list of xbase, for example.
>
> It should still be safe when using vanilla 'rm'.  If you want to be triple
sure maybe something like:

*untested*
cd / ; for i in $(tar tzf /path/to/game43.tgz) ; do test -f $i && rm $i ;
done

but that's a little heavy and the xargs command should be plenty safe. :-)

-Bryan

Reply | Threaded
Open this post in threaded view
|

Re: remove x* and games from my system

Stuart Henderson
In reply to this post by Josh Grosse
On 2008-05-27, Josh Grosse <[hidden email]> wrote:

> On Tue, May 27, 2008 at 05:50:53PM -0500, Travers Buda wrote:
>> * Stuart Henderson <[hidden email]> [2008-05-27 21:52:43]:
>>
>> > On 2008-05-27, Travers Buda <[hidden email]> wrote:
>> > > Using xargs and tar -t (as someone posted) is probably the best
>> > > method, short of just re-installing.
>> >
>> > $DEITY no, look at the file list of xbase, for example.
>> >
>>
>> Err yeah, you're right--very bad idea.
>>
>> ./etc
>> ./etc/X11
>> ./etc/X11/app-defaults
>
> My recommendation was plain rm, without -rf.  Viz:

That's a short step from "oh I don't want all those junk directories
I see scrolling past on the console, I know, I can add -r"...

We actually have instructions for removing xbase already in the faq:
http://www.openbsd.org/faq/upgrade43.html#rmxbase42

Reply | Threaded
Open this post in threaded view
|

Re: remove x* and games from my system

Josh Grosse
On Wed, 28 May 2008 09:27:43 +0000 (UTC), Stuart Henderson wrote
> On 2008-05-27, Josh Grosse <[hidden email]> wrote:
> > My recommendation was plain rm, without -rf.  Viz:
>
> That's a short step from "oh I don't want all those junk directories
> I see scrolling past on the console, I know, I can add -r"...
>
> We actually have instructions for removing xbase already in the faq:
> http://www.openbsd.org/faq/upgrade43.html#rmxbase42

Yep.  But the OP wanted a way to remove *six* filesets, and tar -t piped
to xargs rm will work, *as written*.  Is it foolish to type in a command
without understanding what it does?  Sure.  Has the OP tried any of our
suggestions?  We don't know.  Best practice, I agree, is to either
leave the filesets in place or reinstall.

I think even if we got out a bigger sledgehammer, we'd find this horse is
already dead.  :)