Forums

Skip to content

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

Can't uninstall an old gentoo-sources version [Solved]

Kernel not recognizing your hardware? Problems with power management or PCMCIA? What hardware is compatible with Gentoo? See here. (Only for kernels supported by Gentoo.)
Post Reply
Advanced search
6 posts • Page 1 of 1
Author
Message
halcon
l33t
l33t
User avatar
Posts: 734
Joined: Sun Dec 15, 2019 8:54 pm

Can't uninstall an old gentoo-sources version [Solved]

  • Quote

Post by halcon » Mon Mar 09, 2026 12:42 pm

Hi

I really wonder what is happening...

Code: Select all

ls -al /usr/src/
total 28
drwxr-xr-x  7 root root 4096 Mar  9 14:23 .
drwxr-xr-x 11 root root 4096 Dec 18  2024 ..
drwxr-xr-x  4 root root 4096 Mar  9 14:25 debug
lrwxrwxrwx  1 root root   19 Feb 20 00:32 linux -> linux-6.17.7-gentoo
drwxr-xr-x 27 root root 4096 Feb 20 00:41 linux-6.1.163-gentoo
drwxr-xr-x 27 root root 4096 Jun 30  2025 linux-6.14.4-gentoo
drwxr-xr-x 27 root root 4096 Jan  2 06:05 linux-6.15.9-gentoo
drwxr-xr-x 27 root root 4096 Mar  9 16:23 linux-6.17.7-gentoo
As you see, there is a soft link linux pointing to linux-6.17.7-gentoo

And now:

Code: Select all

emerge -pv --depclean =gentoo-sources-6.1.163

Calculating dependencies... done!
  sys-kernel/gentoo-sources-6.1.163 pulled in by:
    virtual/linux-sources-3-r8 requires sys-kernel/gentoo-sources

>>> No packages selected for removal by depclean
Packages installed:   1111
Packages in world:    128
Packages in system:   50
Required packages:    1111
Number to remove:     0
*Waaat?*

I tried to reinstall virtual/linux-sources-3-r8, it didn't help.

And I can't see nothing in its ebuild to trigger this behaviour.

I have always uninstalled old sources without any issues many-many times...

I don't have installed neither installkernel nor any other of these modern things. Only a manual configuration.

EDIT

And it becomes more and more interesting... 8O

Code: Select all

/usr/src # emerge --deselect =gentoo-sources-6.1.163
>>> Removing sys-kernel/gentoo-sources:6.1.163 from "world" favorites file...
/usr/src # emerge -pv --depclean =gentoo-sources-6.1.163

Calculating dependencies... done!
  sys-kernel/gentoo-sources-6.1.163 pulled in by:
    virtual/linux-sources-3-r8 requires sys-kernel/gentoo-sources

>>> No packages selected for removal by depclean
Packages installed:   1111
Packages in world:    127
Packages in system:   50
Required packages:    1111
Number to remove:     0

/usr/src # cat /var/lib/portage/world | grep sources
sys-kernel/gentoo-sources:6.14.4
sys-kernel/gentoo-sources:6.15.9
sys-kernel/gentoo-sources:6.17.7
EDIT2

And with the slot notation (emerge -pv --depclean gentoo-sources:6.1.163) it does not work either.
Last edited by halcon on Mon Mar 09, 2026 3:14 pm, edited 1 time in total.
A wife asks her husband, a programmer:
- Could you please go shopping for me and buy one carton of milk, and if they have eggs, get 6?
He comes back with 6 cartons of milk.
- Why did you buy 6 cartons of milk?
- They had eggs.
Top
Hu
Administrator
Administrator
Posts: 24380
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Mon Mar 09, 2026 1:44 pm

What is the output of emerge --pretend --verbose --depclean sys-kernel/gentoo-sources? If I had to guess, the only installed gentoo-sources package is gentoo-sources-6.1.163, so removing that version would leave you without any gentoo-sources packages installed, which would violate the dependency requirements of =virtual/linux-sources-3-r8. The ls output shown does not prove that the other packages are installed. Many users litter their /usr/src/ directories, resulting in Portage leaving the directory behind when its corresponding package is removed.
Top
halcon
l33t
l33t
User avatar
Posts: 734
Joined: Sun Dec 15, 2019 8:54 pm

  • Quote

Post by halcon » Mon Mar 09, 2026 3:02 pm

Hu wrote:What is the output of emerge --pretend --verbose --depclean sys-kernel/gentoo-sources? If I had to guess, the only installed gentoo-sources package is gentoo-sources-6.1.163, so removing that version would leave you without any gentoo-sources packages installed, which would violate the dependency requirements of =virtual/linux-sources-3-r8. The ls output shown does not prove that the other packages are installed. Many users litter their /usr/src/ directories, resulting in Portage leaving the directory behind when its corresponding package is removed.
Your guess is pretty logical.

But no, I handle gentoo-sources carefully.

Code: Select all

emerge --pretend --verbose --depclean sys-kernel/gentoo-sources

Calculating dependencies... done!
  sys-kernel/gentoo-sources-6.1.163 pulled in by:
    virtual/linux-sources-3-r8 requires sys-kernel/gentoo-sources

>>> Calculating removal order...

>>> These are the packages that would be unmerged:

 sys-kernel/gentoo-sources
    selected: 6.14.4 6.15.9 6.17.7 
   protected: none 
     omitted: 6.1.163 

All selected packages: =sys-kernel/gentoo-sources-6.14.4 =sys-kernel/gentoo-sources-6.17.7 =sys-kernel/gentoo-sources-6.15.9

>>> 'Selected' packages are slated for removal.
>>> 'Protected' and 'omitted' packages will not be removed.

Packages installed:   1111
Packages in world:    127
Packages in system:   50
Required packages:    1108
Number to remove:     3
EDIT

After making this emerge call there is more information. Portage loves 6.1.163 more than other versions :) I have only one guess: maybe because it was installed the last.

EDIT2

The second guess: because it is stable and all the others are ~.
Last edited by halcon on Mon Mar 09, 2026 3:09 pm, edited 1 time in total.
A wife asks her husband, a programmer:
- Could you please go shopping for me and buy one carton of milk, and if they have eggs, get 6?
He comes back with 6 cartons of milk.
- Why did you buy 6 cartons of milk?
- They had eggs.
Top
Hu
Administrator
Administrator
Posts: 24380
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Mon Mar 09, 2026 3:08 pm

All the versions that are scheduled for removal from your system are already removed in gentoo.git. The version to be kept on your system is available in gentoo.git. As I read the manual page for emerge, it might be the case that depclean can only satisfy the dependencies of linux-sources from packages that are still available to reinstall, which would mean it can only consider 6.1.163 as acceptable. This is speculation on my part, since the manual does not explicitly state this is or is not the case:

Code: Select all

Depclean works by creating  the
              full  dependency  tree from the @world set, then comparing it to
              installed packages.
If you install some other, still in-tree gentoo-sources, does depclean then allow removing 6.1.163?
Top
halcon
l33t
l33t
User avatar
Posts: 734
Joined: Sun Dec 15, 2019 8:54 pm

  • Quote

Post by halcon » Mon Mar 09, 2026 3:10 pm

Hu wrote:All the versions that are scheduled for removal from your system are already removed in gentoo.git
Aaa, maybe, maybe...
A wife asks her husband, a programmer:
- Could you please go shopping for me and buy one carton of milk, and if they have eggs, get 6?
He comes back with 6 cartons of milk.
- Why did you buy 6 cartons of milk?
- They had eggs.
Top
halcon
l33t
l33t
User avatar
Posts: 734
Joined: Sun Dec 15, 2019 8:54 pm

  • Quote

Post by halcon » Mon Mar 09, 2026 3:14 pm

Yes, it works now.

Thank you Hu! :!:
A wife asks her husband, a programmer:
- Could you please go shopping for me and buy one carton of milk, and if they have eggs, get 6?
He comes back with 6 cartons of milk.
- Why did you buy 6 cartons of milk?
- They had eggs.
Top
Post Reply

6 posts • Page 1 of 1

Return to “Kernel & Hardware”

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