Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SOLVED: How to remove unneeded packages?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
9590FXtreme9
n00b
n00b


Joined: 02 May 2015
Posts: 7

PostPosted: Sat May 02, 2015 8:49 pm    Post subject: SOLVED: How to remove unneeded packages? Reply with quote

I need to remove openssh because it doesn't emerge.
Code:
equery d openssh
shows that it is pulled in by "virtual/ssh-0". I found out that "virtual"s ensure you have for example some ssh like package. I don't want any ssh. I want to remove all unnecessary packages like the openssh but the programming that needs to be done seems more important.

Please help me remove.

Regards


Last edited by 9590FXtreme9 on Mon May 04, 2015 11:12 am; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43200
Location: 56N 3W

PostPosted: Sat May 02, 2015 9:13 pm    Post subject: Reply with quote

9590FXtreme9,

Welcome to Gentoo.

emerge -C removes things. I think you will find that ssh is a part of the system set, so it may be pulled back in again later.

Before you rip thing od at random, check to see what depends on them with equery d.
You can remove both the virtual and the installed package.

You may need to add the virtual to your package.mask to keep it off your system.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
9590FXtreme9
n00b
n00b


Joined: 02 May 2015
Posts: 7

PostPosted: Sat May 02, 2015 9:32 pm    Post subject: Correct? Reply with quote

Thank You. I've "emerge -C"ed "openssh" and "virtual/ssh-0" and run this command:
Code:
echo "virtual/ssh-0" >> /etc/portage/package.mask/ssh
. Is this how it should be?
Back to top
View user's profile Send private message
9590FXtreme9
n00b
n00b


Joined: 02 May 2015
Posts: 7

PostPosted: Sat May 02, 2015 9:41 pm    Post subject: Re: Correct? Reply with quote

9590FXtreme9 wrote:
Thank You. I've "emerge -C"ed "openssh" and "virtual/ssh-0" and run this command:
Code:
echo "virtual/ssh-0" >> /etc/portage/package.mask/ssh
. Is this how it should be?


No because:

Quote:
emerge -uDN --with-bdeps=y @world
!!! SYNC setting found in make.conf.
This setting is Deprecated and no longer used. Please ensure your 'sync-type' and 'sync-uri' are set correctly in /etc/portage/repos.conf/gentoo.conf
--- Invalid atom in /etc/portage/package.mask/ssh: virtual/ssh-0
Calculating dependencies... done!


Please help.

Regards
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43200
Location: 56N 3W

PostPosted: Sat May 02, 2015 9:51 pm    Post subject: Reply with quote

9590FXtreme9,

Code:
virtual/ssh-0
contains a version number. You may only give a version if you also give a comparision operator.
Code:
>=virtual/ssh-0
would be correct syntax.

You want to mask all versions so
Code:
virtual/ssh
is correct for you.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
9590FXtreme9
n00b
n00b


Joined: 02 May 2015
Posts: 7

PostPosted: Sat May 02, 2015 10:16 pm    Post subject: "required by @system" "required by @world (ar Reply with quote

Thank You.

(I've just done as the reply says by guessing just before the reply was posted.Unfortunately I was unable to even guess how to fix this )

Quote:
The following mask changes are necessary to proceed:
(see "package.unmask" in the portage(5) man page for more details)
# required by @system
# required by @world (argument)
# /etc/portage/package.mask/ssh:
=virtual/ssh-0

NOTE: The --autounmask-keep-masks option will prevent emerge
from creating package.unmask or ** keyword changes.

Use --autounmask-write to write changes to config files (honoring
CONFIG_PROTECT). Carefully examine the list of proposed changes,
paying special attention to mask or keyword changes that may expose
experimental or unstable packages.


Please help.

Regards
Back to top
View user's profile Send private message
The Doctor
Moderator
Moderator


Joined: 27 Jul 2010
Posts: 2574

PostPosted: Sat May 02, 2015 10:21 pm    Post subject: Reply with quote

You can silence that warning by doing the same with package.provided, but that is potentially dangerous because portage will assume that ssh exists.
_________________
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43200
Location: 56N 3W

PostPosted: Sat May 02, 2015 10:31 pm    Post subject: Reply with quote

The Doctor,

I think you can also do something in /etc/portage/profile/, so ssh is not pulled in by @system but I've never needed to do it.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6281

PostPosted: Sun May 03, 2015 5:49 am    Post subject: Reply with quote

NeddySeagoon wrote:
/etc/portage/profile/

Untested:
/etc/portage/profile/packages wrote:
-*virtual/ssh

You might need additionally (though probably not):
/etc/portage/profile/eapi wrote:
5

You do not need to put anything in package.mask since it well help nothing except triggering errors for the case that something wants to pull it in. (Of course, if you want to get errors in such a case, it's a different story...)
Back to top
View user's profile Send private message
The Doctor
Moderator
Moderator


Joined: 27 Jul 2010
Posts: 2574

PostPosted: Sun May 03, 2015 6:08 am    Post subject: Reply with quote

Although, I have to say this seems like a lot of trouble to go through for ssh. As long as it isn't in a run level it won't run unless asked and the disk space it takes up is minimal.
Quote:
I need to remove openssh because it doesn't emerge.
This is probably where you should focus your attention. It is likely a warning you that you have a configuration problem or a broken package.

Besides, there are some programs that need ssh and if it isn't available you might get unexpected build failures.
_________________
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1969

PostPosted: Sun May 03, 2015 11:29 am    Post subject: Reply with quote

Not a helpful answer, but I wouldn't mask system packages if I were you; it could lead to problems down the road.

It might be worth finding out what's stopping ssh emerging, too, since the problem could affect other packages.

Will
Back to top
View user's profile Send private message
9590FXtreme9
n00b
n00b


Joined: 02 May 2015
Posts: 7

PostPosted: Mon May 04, 2015 10:56 am    Post subject: Reply with quote

Thanks to yous I solved the problem with these commands:

echo "-*virtual/ssh" >> /etc/portage/profile/packages
echo "virtual/ssh" > /etc/portage/package.mask/ssh

(Be warned that > overwrites the file and >> appends)

I am guessing ssh wasn't emerging because of the "static" USE flag. Tar (and two other packages) emerged -- and wget can download again -- only after I removed the static USE flag from /etc/portage/make.conf

I'd leave the USE flag enabled because it is said that it improves performance and at least seemingly most don't have any problems with it.
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6281

PostPosted: Mon May 04, 2015 7:26 pm    Post subject: Reply with quote

9590FXtreme9 wrote:
I'd leave the USE flag enabled because it is said that it improves performance

This is a wrong information. In fact, it wlil hurt performance since (normally shared) libraries have to be loaded multiple times. Not to speak about the memory waste.
And more important: It is a security risk (unless you know very well when to reemerge what and in which order) and will always cause you only headache with emerge.
It is a good idea to use this flag never unless you must.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43200
Location: 56N 3W

PostPosted: Mon May 04, 2015 7:36 pm    Post subject: Reply with quote

9590FXtreme9,

You should only set USE=static on packages that you will be adding to your initrd as it saves having to put the libraries in the initrd too.

Paranoid users should build busybox statically, so that it works when you accidentally remove glibc. Don't try that at home.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6281

PostPosted: Mon May 04, 2015 7:50 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Paranoid users should build busybox statically

Actually, busybox is a strange case: You should put the static flag there, because if you don't, you do get a static version and a dynamic version which practicalyl nobody ever needs. With the static flag you only get the static version.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum