Automatic cleaning for the orphans

In general, orphan could in theory be cleaned up automatically once in a while.

Although if it is a desirable behavior, that’s debatable. There’s a risk of removing accidentally something more or less important or desired.

There could be a reminder notification implemented in Pamac though. Like once a month: a pop-up showing the list of orphans if there’s any and remove them if they’re not required anymore (or mark them as explicitly installed if the user actually wants to keep those packages around).

Your are correct - but that is a user decision - Manjaro Linux cannot ever account for such.

I’m not sure how effective that might be with so many variations via the AUR (and other sources)… electron, electron-git, electron-bin, electron-fred, electron-wilma… plus the multiple versions that might actually need to be installed concurrently for various applications.

Oh the notification wasn’t for Electron in itself, I was talking about a reminder of checking up orphans once in a while if there’s any. Something very basic and straightforward, while still covering a task that should be done once in a while. Older Electron versions, unless you actually installed them manually, will be marked as orphans, so they’ll appear among the other orphan packages.

Indeed, I’m more in favor of a friendly reminder of like “Oh, 4 orphan packages detected. Maybe you want to clean them up.” more than anything else.

1 Like

Can’t wait to see how 100% automated Manjaro will look like. I’m sure it will be easy to implement 1000 more scripts to veer off Arch KISS principle. :stuck_out_tongue:

2 Likes

That is impossible.

I just had a conversation today with a client - one of their salesreps wanted a .csv representation of their assiigned clients with a similar represensation of what they bought.

I said impossible - while csv does allow for such granular export with +700 worth of SKUs - the result would be impossible to handle.

Same with your suggestion - impossible to handle…

1 Like

I like how people focus on the first line of my post, despite saying right after that it might not be a very good idea. lol

Automation? AI? Isn’t that the motto of the 2020’s? :slight_smile:

Hum… I think you’re overthinking it. Or I don’t understand what you’re trying to say (if so, I’m sorry for my terrible reading comprehension).

I mean, I can count the amount of orphans with a single line of CLI (example below).

pamac list -o | wc -l
4

So I guess a little pop-up in the notification, showing this number with some cute text around it, shouldn’t be such a herculean task to do. But what do I know, I’m not a professional programmer, let alone a programmer to begin with.

1 Like

Why though? For people who can’t be bothered to learn anything about the OS they’re using that pop-up notification is meaningless.

1 Like

Yes - you can - image having to handle 100.000 systems with different configurations - with different custom packages … then you realise that it is impossible.

Each user need to account for the system(s) under the users control … it cannot and should not be a task of the free and opensource distibuton you are using … take responsibility for your your system - also if you are less experienced - if you are experienced enough to use custom packages - you know you can take responsibility for your system.

Oh boy - I have taken heat for pointing out the obvious - the obvious fact that Manjaro LInux is not responsible for your system …

The historical fact is here → Manjaro Maintenance Guide | root.nix.dk

3 Likes

You could possibly add something similar to one of the better customisable fetch apps for terminal use, rather than the notification app. Naturally, this would only be a notification of the current state rather than an attempt to clean orphans.

Though, after jumping back and forth between all those lillypads and hoops, it’s probably easier to enter the example you gave directly into the terminal, and get on with life.

Cheers.

Disclaimer: Untested, but likely possible.

In my opinion, a simple report of the amount of orphans would not be in conflict with your opinion.

Like suggested earlier, in a situation where the package manager reports a warning/information about the amount of orphans, it is still the administrators responsibility to take care of them.

After all pamac is also reporting other things like:

  • a required restart
  • the need to compile third party packages

Displaying warnings like that could be optional.

2 Likes

What you and others are saying is

I don’t want to be responsible for my system

But you are wrong - you are responsible for your system - despite the updates provided - no one else but you

Why is everyone so hellbent on blaming upstream ?

You are using an operating system provided at no cost - please grow up !

7 Likes

That is not what I or some others said.
Please elaborate how an automated notification, would take away ones responsibility? One would still have the responsibility to check what the packages are and what the proper next steps would be…

Come on, that was not what I was doing either. And the way I understand the previous comments, that is also not what these comments were about.

After all, it was just some constructive comments about what could improved. Nothing more.

There ia no need to get passive agressive (that is how it sounds to me).

3 Likes

And when that has happened in the past, some users tried to blame Manjaro Team when some of their packages were incorrectly marked as orphans and removed in error

Removing orphans requires user discernment and responsibility

I’m more in favor of a friendly reminder

a little pop-up in the notification, showing this number

notify-send "Orphan packages detected: $(pamac list -o | /usr/bin/wc -l)"
1 Like

I can imagine how that might work; we could even have our own Dennis Nedry gatekeeper, saying “Uh uh uh! You didn’t say the magic word!”. Of course, such a sophisticated level of automation didn’t work out particularly well on Jurassic Park.

“Oh, look, it pops up and shows all these things I don’t have a clue about… Isn’t it cool?!”

I do actually like the idea of an orphaned package reminder, of sorts, though I doubt it would be overly useful to those who already manage them regularly.

The underlying truth is that the logic required is deeper than most might anticipate. A quick internet search automatically detect orphaned packages linux will give an indication of the level of complexity.

To extend that to allow deletion of files via some kind of abstraction layer is like giving a monkey a hand granade and saying “Please don’t pull the pin”; (IMHO).

Adequate methods already exist for handling orphaned packages; using pacman:

# Find Orpaned Packages:
sudo pacman -Rns $(pacman -Qtdq)

This command searches for orphaned packages and, if any are found, you have the option to delete them, along with associated config files.

Even then, results might include packages one actually does wish to keep, so automatically deleting them is not necessarily an option.

pamac is quite capable (as mentioned in the Manjaro CheatSheet):

# Check for orphaned packages:
pamac list -o

# Remove all orphans:
pamac remove -o

…and, more recently:

As previously noted, I’m not particularly against the idea of an orphan count (or similar), however, a simple command can give a simple report, and requires very little effort; of course, that also requires the effort of learning.

2 Likes