View previous topic :: View next topic |
Author |
Message |
Kingoftherings Guru
Joined: 04 May 2008 Posts: 328
|
Posted: Sat Jul 12, 2008 9:43 pm Post subject: How do I unmerge KDE entirely? |
|
|
I installed KDE4 on my machine to just try it out, but it didn't work and now I want to get rid of it because its using up hard drive space.
Just simply unmerging kdebase-meta doesn't unmerge all the packages it merged.
And I'd like to do it withoug doing it all one at a time. |
|
Back to top |
|
|
papahuhn l33t
Joined: 06 Sep 2004 Posts: 626
|
Posted: Sat Jul 12, 2008 9:58 pm Post subject: |
|
|
emerge --depclean --pretend _________________ Death by snoo-snoo! |
|
Back to top |
|
|
Kingoftherings Guru
Joined: 04 May 2008 Posts: 328
|
Posted: Sat Jul 12, 2008 10:44 pm Post subject: |
|
|
It wants me to run emerge -uDN world before it can do anything. Its wanting to install a bunch of KDE things, which is not what I wanted, but I tried it anyway just so depclean would work, but it fails on the install of libkonq |
|
Back to top |
|
|
halfgaar l33t
Joined: 22 Feb 2004 Posts: 781 Location: Netherlands
|
Posted: Sat Jul 12, 2008 11:55 pm Post subject: |
|
|
You can do something like this:
Code: | equery list kde-base/ | grep kde-base| xargs emerge --unmerge --pretend |
Adjust to suit your needs. And always verify the package list, of course. _________________ Linux backups the right way.
Get surround sound working. |
|
Back to top |
|
|
Kingoftherings Guru
Joined: 04 May 2008 Posts: 328
|
Posted: Sun Jul 13, 2008 12:14 am Post subject: |
|
|
Thanks that did exactly what I needed. But just for future reference, I could understand the command, but what does xargs do? |
|
Back to top |
|
|
pappy_mcfae Watchman
Joined: 27 Dec 2007 Posts: 5999 Location: Pomona, California.
|
Posted: Sun Jul 13, 2008 7:26 am Post subject: |
|
|
Use --depclean with the utmost care. It can and will break your system if you don't know exactly what each package is that it's trying to remove, and sometimes, even if you do know what packages its removing. I can't use it on this machine, because the first thing it wants to nuke is gcc. Es no bueno!
You can also look through the kde ebuilds and unmerge the dependencies manually. It's not quite as easy as a --depclean, but it's a lot less damaging as well.
Blessed be!
Pappy _________________ This space left intentionally blank, except for these ASCII symbols. |
|
Back to top |
|
|
halfgaar l33t
Joined: 22 Feb 2004 Posts: 781 Location: Netherlands
|
Posted: Sun Jul 13, 2008 10:33 am Post subject: |
|
|
Quote: | Thanks that did exactly what I needed. But just for future reference, I could understand the command, but what does xargs do? |
xargs takes in the output of the previous steps of the pipeline, and allows you to construct commands with it. If you run the command without the xargs step, you will get a list of KDE packages. The xargs command pastes that list behind "emerge --unmerge --pretend", with newlines becoming spaces. _________________ Linux backups the right way.
Get surround sound working. |
|
Back to top |
|
|
vespaman Guru
Joined: 28 Aug 2002 Posts: 348 Location: Stockholm, Sweden
|
Posted: Sun Jul 13, 2008 4:06 pm Post subject: |
|
|
OK. So I am in the same boat. Been trying the 4.1rc, and it is time to remove it. Can I? I installed it using the line;
Code: | emerge -v kdebase-meta:kde-4.1 |
I guess I could just remove the stuff that I put in /etc/portage, remove the overlay from layman, and let the stuff lay around forever, but if I could clean up, it would be nicer... |
|
Back to top |
|
|
deathcon1 Apprentice
Joined: 30 Aug 2007 Posts: 182 Location: Canada
|
Posted: Sun Jul 13, 2008 4:13 pm Post subject: |
|
|
This is how I remove KDE from my systems:
FIRST: check to make sure that everything is working properly and that major system parts (i.e. kernel, GCC, python, etc...) are all properly pointing to the correct versions, or this can cause havoc with your system. I.E. I've uninstalled my current kernel, the running version of GCC and Python, all in one move, because I was careless with this command. Combined with EIX and revdep-rebuild, and eclean, this is, imo one of the best ways to keep a system clean. Just really pay attention.
Anyways, warning disclaimer aside, on to uninstlaling KDE (assuming you used the meta-package):
Code: | emerge --unmerge kde-meta && emerge --depclean && revdep-rebuild && eclean packages && eclean distfiles |
What this will do is:
1. uninstall kde-meta. When you issued "emerge kde-meta" it pulled in all the other packages as a dependency, so when you
2. issue emerge --depclean, it looks for dependencies which have had their successor removed (in this case the kde-meta package), and removes them. NOTE: this command is applied system-wide, which can be dangerous if it removes something it wasnt supposed (happens from time to time), which is why we do
3. revdep-rebuild which checks all the packages installed and looks for packages missing dependencies and installs them again. This command also tells us if there are still some KDE packages left, which at this point must be manually uninstalled.
4/5. Clean out the source packages from your system to free up the harddrive space. |
|
Back to top |
|
|
vespaman Guru
Joined: 28 Aug 2002 Posts: 348 Location: Stockholm, Sweden
|
Posted: Sun Jul 13, 2008 4:39 pm Post subject: |
|
|
If I do that, it will only remove kde 3.5, which I would like (if possible) to keep. (This is what I am using). Not the 4.1rc, which I'd like to get rid of. |
|
Back to top |
|
|
halfgaar l33t
Joined: 22 Feb 2004 Posts: 781 Location: Netherlands
|
Posted: Sun Jul 13, 2008 4:45 pm Post subject: |
|
|
Working with depclean remains a dangerous thing. When using it, you have to make sure every package is up-to-date (update with --deep) and that you issue a "emerge --update --newuse --deep world" every time you change use flags.
IMO, the package system should give better control over removing packages; the fact that all KDE e-builds are a dependency of kde-base/kdebase, is a hack (again, in my opinion). Portage should have specific support for multi-ebuild software. On Debian it's even worse. I never know which package to install. There are 100 vim packages for example, and one can never know which package is meant to be directly installed, or pulled in as dependency.
Well, enough ranting
@vespaman
You can simply do something like:
Code: | equery list kde-base/ | grep -P "kde-base.*4\.1.*"| xargs emerge --unmerge --pretend |
You need to understand regular expressions a bit to understand that command. ".*" means zero or more of any character. And "\." means ".": it's an escaped dot, a dot with a backslash preceding it. This is necessary because a normal dot has a special meaning (any character). _________________ Linux backups the right way.
Get surround sound working. |
|
Back to top |
|
|
vespaman Guru
Joined: 28 Aug 2002 Posts: 348 Location: Stockholm, Sweden
|
Posted: Sun Jul 13, 2008 5:08 pm Post subject: |
|
|
I'm sorry for being such a newbie on this, but...
.. this does not work either...
If I do:
Code: |
# equery list kde-base/
[ Searching for all packages in 'kde-base' among: ]
* installed packages
[I--] [ ] kde-base/akregator-3.5.9-r1 (3.5)
[I--] [ ] kde-base/amor-3.5.9 (3.5)
[I--] [ ] kde-base/ark-3.5.9 (3.5)
[I--] [ ] kde-base/atlantik-3.5.9 (3.5)
[I--] [ ] kde-base/atlantikdesigner-3.5.9 (3.5)
[I--] [ ] kde-base/automoc-9999 (0)
[I--] [ ] kde-base/blinken-3.5.9 (3.5)
[I--] [ ] kde-base/certmanager-3.5.9 (3.5)
[I--] [ ] kde-base/dcoprss-3.5.9 (3.5)
[I--] [ ] kde-base/dolphin-4.0.85 (kde-4.1)
[I--] [ ] kde-base/drkonqi-3.5.9 (3.5)
[I--] [ ] kde-base/drkonqi-4.0.85 (kde-4.1)
[I--] [ ] kde-base/eyesapplet-3.5.9 (3.5)
.. and so on..
|
It seams that the last (..) isn't input to grep, hence
Code: |
portage # equery list kde-base/ | grep "kde-4"
|
only returns
Code: |
kde-base/kdebase-startkde-4.0.85
|
Even if I enter a line like this
Code: |
equery list kde-base/ | grep "kde\-4\.0\.85"
|
.. it only returns startkde...
Edit: my bad! I can of course build further on 'equery list kde-base/ | grep "kde.*-4\.0\.85" ' ! |
|
Back to top |
|
|
deathcon1 Apprentice
Joined: 30 Aug 2007 Posts: 182 Location: Canada
|
Posted: Sun Jul 13, 2008 6:31 pm Post subject: |
|
|
Ok, first make sure your GCC is pointing to the right version:
Code: | gcc-config -l
gcc-config <number of latest version> |
Then make sure your Python is up to date:
You're actually using the latest kernel
Code: | eselect kernel list
eselect kernel set <number of latest kernel> |
NOTE: if you had to change the kernel then you'll have to recompile the kernel and set all the options and boot into it before continuing
Now:
Code: | emerge --unmerge kde-meta
emerge --depclean
revdep-rebuild
eclean distfiles
eclean packages |
NOTE: look through revdep-rebuild, if there are any KDE packages listed in there still you'll have to remove them by hand at this point. It should tell you who is pulling in what packages, uninstall those packages (i.e. the one's pulling things in, it'll be alot less work for you), then do another emerge --depclean and revep-rebuild. Rinse-repeat until no more KDE packages are being pulled in. Once this is done, you'll no longer have KDE installed.
NOTE: Depclean is, as mentioned above, an incredibly useful tool, specially when combined wth revdep-rebuild and eclean to keep your system clean and free up disk space, however it isn't a "smart" package, and will ruthlessly remove old versions of packages and occasionally one of those packages is still required, which is why you MUST run revdep-rebuild after a depclean or your risk bjorking a package or worse (i.e. unbootable system.)
As always, you should never issue command blindly; read up on them so you understand what they are going to do. |
|
Back to top |
|
|
halfgaar l33t
Joined: 22 Feb 2004 Posts: 781 Location: Netherlands
|
Posted: Sun Jul 13, 2008 10:46 pm Post subject: |
|
|
@vespaman
It is possible that you have KDE 4 packages which are not exactly 4.0.85. It's safer to construct the list based on:
equery list kde-base/ | grep -P "kde-base.*4.*"
Or something similar.
@deathcon1
In theory, that may work, but it's not what vespaman needs right now. _________________ Linux backups the right way.
Get surround sound working. |
|
Back to top |
|
|
deathcon1 Apprentice
Joined: 30 Aug 2007 Posts: 182 Location: Canada
|
Posted: Mon Jul 14, 2008 1:47 am Post subject: |
|
|
halgaar: it does work, I give KDE a shot every month or so, and use that to remove it lol. Unfortunatly, I was slightly hung-over this morning and read that as KDE not KDE4... |
|
Back to top |
|
|
vespaman Guru
Joined: 28 Aug 2002 Posts: 348 Location: Stockholm, Sweden
|
Posted: Mon Jul 14, 2008 10:29 am Post subject: |
|
|
I'm clean now. I think...
I ended up using a line similar to this;
Quote: | # equery list kde-base/ | grep -P "kde-base.*4\.0\.85"| xargs emerge --unmerge |
Thanks halfgaar for that one!
Then I had to remove about 8 qt-* which where blockers for older qt, which portage wanted to pull in.
Then I did a -deep update on kde-meta.
I just did a revdep-rebuild -p, but it reported my system was already ok.
I then did a "emerge --depclean -p" which told me that phonon-9999. soprano-9999 and kde-base/automoc-9999 where still around. Unmerged them manually.
Now it looks like this;
Code: |
# emerge --depclean -p
WARNING: repository at /usr/local/portage/layman is missing a repo_name entry
*** WARNING *** Depclean may break link level dependencies. Thus, it is
*** WARNING *** recommended to use a tool such as `revdep-rebuild` (from
*** WARNING *** app-portage/gentoolkit) in order to detect such breakage.
*** WARNING ***
*** WARNING *** Also study the list of packages to be cleaned for any obvious
*** WARNING *** mistakes. Packages that are part of the world set will always
*** WARNING *** be kept. They can be manually added to this set with
*** WARNING *** `emerge --noreplace <atom>`. Packages that are listed in
*** WARNING *** package.provided (see portage(5)) will be removed by
*** WARNING *** depclean, even if they are part of the world set.
*** WARNING ***
*** WARNING *** As a safety measure, depclean will not remove any packages
*** WARNING *** unless *all* required dependencies have been resolved. As a
*** WARNING *** consequence, it is often necessary to run
*** WARNING *** `emerge --update --newuse --deep world` prior to depclean.
Calculating dependencies... done!
>>> These are the packages that would be unmerged:
app-misc/strigi
selected: 0.5.10
protected: none
omitted: none
sys-libs/pwdb
selected: 0.62
protected: none
omitted: none
sys-devel/gcc
selected: 4.1.2
protected: none
omitted: 4.3.1
app-office/akonadi-server
selected: 2008.07.07
protected: none
omitted: none
net-wireless/bluez-libs
selected: 3.32
protected: none
omitted: none
gnome-base/gconf
selected: 2.22.0
protected: none
omitted: none
app-text/enchant
selected: 1.3.0
protected: none
omitted: none
kde-base/qimageblitz
selected: 0.0.4
protected: none
omitted: none
dev-libs/redland
selected: 1.0.7
protected: none
omitted: none
sys-kernel/vanilla-sources
selected: 2.6.26_rc8
protected: none
omitted: 2.6.26
sys-kernel/vanilla-sources
selected: 2.6.26_rc9
protected: none
omitted: 2.6.26
x11-libs/libxklavier
selected: 3.6
protected: none
omitted: none
dev-python/pycrypto
selected: 2.0.1-r6
protected: none
omitted: none
net-mail/mailbase
selected: 1
protected: none
omitted: none
media-gfx/exiv2
selected: 0.17
protected: none
omitted: none
dev-cpp/clucene
selected: 0.9.20
protected: none
omitted: none
gnome-base/orbit
selected: 2.14.13
protected: none
omitted: none
dev-libs/rasqal
selected: 0.9.15
protected: none
omitted: none
app-text/iso-codes
selected: 1.5
protected: none
omitted: none
media-libs/raptor
selected: 1.4.17
protected: none
omitted: none
dev-python/python-fchksum
selected: 1.7.1
protected: none
omitted: none
dev-lang/python
selected: 2.4.4-r6
protected: none
omitted: 2.5.2-r5
>>> 'Selected' packages are slated for removal.
>>> 'Protected' and 'omitted' packages will not be removed.
Packages installed: 795
Packages in world: 57
Packages in system: 51
Unique package names: 795
Required packages: 773
Number to remove: 22
|
I will probably leave it like this, even if a depclean looks to be OK in this case afaics. But it may be good to have the kernels and GCC around for a while. |
|
Back to top |
|
|
halfgaar l33t
Joined: 22 Feb 2004 Posts: 781 Location: Netherlands
|
Posted: Mon Jul 14, 2008 10:49 am Post subject: |
|
|
Which GCC do you use (gcc-config -l)? The old one can be unmerged if you've recompiled your system with the new one, I believe. Or, perhaps that's only the case when the new version is incompatible. Anyway, if you do want to clean it up, you may want to read the GCC upgrading guide(s).
As for the rest of the packages, some of them don't appear to be superfluous (such as mailbase), so if you do decide to clean up, be careful. _________________ Linux backups the right way.
Get surround sound working. |
|
Back to top |
|
|
|