Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

world file clean-up

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
14 posts • Page 1 of 1
Author
Message
EasterParade
l33t
l33t
User avatar
Posts: 938
Joined: Sat Jul 26, 2003 10:48 am

world file clean-up

  • Quote

Post by EasterParade » Sat Oct 09, 2021 2:41 pm

Recently I asked a very dumb question here.

While I am at it I´d like to ask about the following packages.
They sit in the world file. Could I remove them from the world file?
Is it recommendable or advisable to remove those?

Everything KDE including akonadi etc, everything that ends with -meta and -frameworks.

And what about the myriad of small perl packages? Could they go or need they stay?

Thanks for any suggestion.
Top
fedeliallalinea
Administrator
Administrator
User avatar
Posts: 31985
Joined: Sat Mar 08, 2003 11:15 pm
Location: here
Contact:
Contact fedeliallalinea
Website

  • Quote

Post by fedeliallalinea » Sat Oct 09, 2021 3:28 pm

In the world file there should be only the packages you want to use and not its dependencies.
For example if you use plasma you should only have kde-plasma/plasma-meta in the world file
so if one day you want to uninstall it just emerge -C kde-plasma/plasma-meta and then
emerge --depclean to remove the dependencies (if they are not in the world file and nobody
depends on them they will be removed).
There is also a script to check the world file sanity.
Questions are guaranteed in life; Answers aren't.

"Those who would give up essential liberty to purchase a little temporary safety,
deserve neither liberty nor safety."
- Ben Franklin
https://www.news.admin.ch/it/nsb?id=103968
Top
Etal
Veteran
Veteran
User avatar
Posts: 1932
Joined: Fri Jul 15, 2005 3:01 pm

  • Quote

Post by Etal » Sat Oct 09, 2021 3:38 pm

The world file should only contain the packages you specifically want installed. It ensures that when you run "emerge -a --depclean" it doesn't remove them.

You should be able to recognize the packages in the list. Usually, the random packages end up there because you needed to re-emerge some package at some point but didn't use -1/--oneshot option.

So I assume the kde -meta packages you want to keep. If you don't know what those perl packages are, you can remove them.

Once you clean up your world file, you can run "emerge -p --depclean" and see what it proposes to uninstall. If there are things you want to keep, you can always run "emerge --noreplace <package>" to add them back to the world file.
Top
APolozov
Apprentice
Apprentice
User avatar
Posts: 194
Joined: Thu Sep 28, 2006 3:44 pm
Location: Voronezh, Russia

  • Quote

Post by APolozov » Sat Oct 09, 2021 3:38 pm

IMHO the world file should contain a list of only those packages that you personally need and those packages that you want to keep, even if they are subject to deletion due to dependencies.
For example my worldfile:

Code: Select all

app-admin/hddtemp
app-admin/logrotate
app-admin/metalog
app-admin/sudo
app-admin/testdisk
app-arch/p7zip
app-arch/rar
app-arch/tarsync
app-arch/unrar
app-cdr/cdrtools
app-cdr/iat
app-editors/nano
app-emulation/virtualbox-additions
app-emulation/virtualbox-extpack-oracle
app-emulation/wine-staging
app-misc/mc
app-portage/cpuid2cpuflags
app-portage/emerge-delta-webrsync
app-portage/gentoolkit
app-shells/bash-completion
app-shells/gentoo-bashcomp
dev-util/strace
games-emulation/dosbox
kde-apps/dolphin
kde-apps/konsole
kde-apps/okular
kde-plasma/plasma-meta
media-gfx/exif
media-gfx/xsane
media-sound/alsa-utils
media-sound/bluez-alsa
media-sound/mp3splt
media-sound/mp3val
media-tv/w_scan
media-video/mplayer
media-video/mpv
net-ftn/golded+
net-ftn/qicoxe
net-misc/dhcpcd
net-misc/minidlna
net-misc/ntp
net-p2p/ktorrent
net-p2p/syncthing
sys-apps/hdparm
sys-apps/memtest86+
sys-apps/mlocate
sys-apps/swapspace
sys-apps/usbutils
sys-boot/grub
sys-fs/mdadm
sys-fs/mtpfs
sys-fs/ntfs3g
sys-kernel/gentoo-sources
sys-kernel/linux-firmware
sys-power/acpid
sys-process/cronie
sys-process/htop
virtual/husky
www-client/firefox
Excuse my bad English, I only study it.
Top
cboldt
Veteran
Veteran
User avatar
Posts: 1046
Joined: Wed Aug 24, 2005 2:54 pm

  • Quote

Post by cboldt » Sat Oct 09, 2021 4:45 pm

Here is how I cleaned my "world" file. I ran this little ditty to get an idea of what was in "world" that didn't need to be there.

Code: Select all

for i in `cat /var/lib/portage/world`;do printf "$i:\n";qdepends -Q -qq $i;done
This results in a list of packages in "world" with a ":" immediately after the name of each package that is in "world." For some of the packages, additional packages (not in world) will be listed below. That means that the package below depends on the package above, so the package above (supposedly) doesn't need to be in "world."

HOWEVER, MASSIVE EXCEPTION - before doing `emerge --deselect packagename` to remove packagename from world, if the package below is a virtual, keep "packagename" in world. There are an additional few that that this process suggests might be removed, but I keep them in ...

app-admin/logrotate (supposedly pulled in by sys-apps/portage)
app-portage/gentoolkit (supposedly pulled in by sys-apps/portage)
net-fs/samba (supposedly pulled in by dev-perl/Parse-Yapp)
x11-terms/rxvt-unicode (supposedly pulled in by sys-libs/ncurses)

I'm not able to articulate a good explanation for my judgement there, other than the supposedly excess appearance in world is of a package that I don't trust will stay in place if I take it out of world, or the dependency seems upside down. That concern can be tested, but even then I'm simply (maybe irrationally) leery of taking certain package names out of the world file.

Testing consists of taking a packgename out of the world file (emerge --deselect packagename), then doing a pretend emerge --depclean (emerge -pv --depclean) to see if any package is removed. If not, then there was no need for the packagename to appear in world in the first place. The command to restore packagenename to the world file without recompiling it is `emerge --select --noreplace packagename`

I cleaned out a good 20% of packagenames in world with this process. Some excess entries I attribute to the order (over years) of bringing in new programs and facilities. Other excess was because I was not (still not) disciplined to do the --oneshot when troubleshooting / changing USE flags to test, and similar.
Top
EasterParade
l33t
l33t
User avatar
Posts: 938
Joined: Sat Jul 26, 2003 10:48 am

  • Quote

Post by EasterParade » Sat Oct 09, 2021 5:07 pm

Thank you all very much; very helpful.
So, many more stuff will remain than I thought.
After using the script I will know better.

Thanks again
Top
Irre
Guru
Guru
Posts: 434
Joined: Sat Nov 09, 2013 10:03 am
Location: Stockholm

  • Quote

Post by Irre » Sat Oct 09, 2021 6:26 pm

I run this script to clean the world:

Code: Select all

for i in `cat /var/lib/portage/world`
do
  if emerge -p --depclean $i | grep "These are the packages that would be unmerged:">null
  then echo $i >>/var/lib/portage/world-new
  else echo "removing:" $i
  fi
done
mv /var/lib/portage/world /var/lib/portage/world-previous
mv /var/lib/portage/world-new /var/lib/portage/world
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56077
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sat Oct 09, 2021 7:03 pm

transsib,

There are no dumb questions, except the one you don't ask, as you never know the answer.
Be on your guard for dumb answers though.

All these scripts that help clean your world file are only advisories.
You decide what you really want there.

System set packages should not normally be there but if you want to keep gcc-2.95 installed because you have a use for it, its your gentoo, your way.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
Jaglover
Watchman
Watchman
User avatar
Posts: 8291
Joined: Sun May 29, 2005 1:57 am
Location: Saint Amant, Acadiana

  • Quote

Post by Jaglover » Sat Oct 09, 2021 9:06 pm

world file is practically the only place in your computer where you delete everything you do not know what it is for. And as NeddySeagoon said, only you, armed with a text editor, can sanitize it.
My Gentoo installation notes.
Please learn how to denote units correctly!
Top
figueroa
Advocate
Advocate
User avatar
Posts: 3032
Joined: Sun Aug 14, 2005 8:15 pm
Location: Edge of marsh USA
Contact:
Contact figueroa
Website

  • Quote

Post by figueroa » Sun Oct 10, 2021 3:17 am

Another general rule, libraries are dependencies and shouldn't be in world. I have one lib in my world file, sys-libs/ncurses-compat, and I've forgotten why I added it, but it's not a dependency, and something not too long ago compelled me to add it.
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi -wayland
Top
EasterParade
l33t
l33t
User avatar
Posts: 938
Joined: Sat Jul 26, 2003 10:48 am

  • Quote

Post by EasterParade » Sun Oct 10, 2021 11:26 am

I haven´t used any script yet, just scrutinized the file for stuff that should not be there, like any python.
All these scripts that help clean your world file are only advisories.
You decide what you really want there.
I so miss porthole: it helped at getting a quicker view on dependencies. But I understand that porthole
is gone. So, NeddySeagoon, sometimes I take a good guess or try my luck with equery d.
world file is practically the only place in your computer where you delete everything you do not know what it is for.
A leap of faith, careful judgement and analysis.
Another general rule, libraries are dependencies and shouldn't be in world
Thanks for the clear statement too.

NeddySeagoon, I got more "dumb" questions ...
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56077
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sun Oct 10, 2021 11:32 am

transsib,
transsib wrote:NeddySeagoon, I got more "dumb" questions ...
Then ask, and filter the answers. :)
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
The Doctor
Moderator
Moderator
User avatar
Posts: 2678
Joined: Tue Jul 27, 2010 10:56 pm

  • Quote

Post by The Doctor » Mon Oct 11, 2021 2:08 am

I don't let my file get too polluted so what I do as a clean up routine is to read the file and for anything I'm unsure of I emerge --deselect it and then run emerge -pc. If portage wants to nuke something I know it should be in the world file so I can emerge --select it. Also any maintenance rebuilds you do should include the -1 option so the world file doesn't get polluted in the first place. Normally its only really edge cases like utilities that should be dependencies but aren't because 3rd party and such.
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.
Top
SDRRadioGuy
n00b
n00b
Posts: 1
Joined: Tue Jul 18, 2023 9:04 pm
Location: Irvine, California, USA

World file check from the Gentoo Wiki

  • Quote

Post by SDRRadioGuy » Tue Jul 18, 2023 10:32 pm

I used the suggestions from the Gentoo Wiki to clean up my world file. The script on the Wiki is faster that the ones above and has fewer incorrect packages recommended for "deselection".

https://wiki.gentoo.org/wiki/User:Vaukai/checkworldfile
Top
Post Reply

14 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy