You are not logged in.

#1 2007-10-13 21:55:09

remyoudompheng
Developer
From: France
Registered: 2007-10-13
Posts: 4

Remove "explicitly installed" mark on packages

Hello,

I would like to clean the packages installed on my system. Of course, pacman -Qe will show me packages installed as dependencies which are no longer needed. But there are a lot of orphaned packages which remain hidden because they got installed manually for some reason. There are two things in pacman that I miss :
- an option to list explicitly installed packages
- an option taking package names as arguments which would mark them as non-explicitly installed (so that if they are actually orphaned `pacman -Qe` list them)

The first one can be almost trivially done by a small script, but I wonder what is The Right Thing to do for the second action. Is it clean to simply change the REASON field in the database file ?

Offline

#2 2007-10-13 22:42:31

elasticdog
Member
From: Washington, USA
Registered: 2005-05-02
Posts: 995
Website

Re: Remove "explicitly installed" mark on packages

The first one will be taken care of soon: http://bugs.archlinux.org/task/7343, and you the second doesn't really make sense to me...either they were explicitly installed or they were a dependency of another package, right?  If you wanted to unmark them an explicitly installed, where would pacman say they came from?  If you happened to explicitly install them as a precursor to installing another package that required them, you'd basically have to just remember that you did that in order for the second feature to be useful anyway.  I guess I don't get what the advantage would be despite causing database confusion.

Last edited by elasticdog (2007-10-13 22:43:03)

Offline

#3 2007-10-14 00:50:15

hacosta
Member
From: Mexico
Registered: 2006-10-22
Posts: 423

Re: Remove "explicitly installed" mark on packages

it makes sense if for instance you want to install a package from aur say foo

foo depends on bar on repo x
then you need to explicitely install bar(even though it was a depend on foo)

Offline

#4 2007-10-14 07:20:02

remyoudompheng
Developer
From: France
Registered: 2007-10-13
Posts: 4

Re: Remove "explicitly installed" mark on packages

If you wanted to unmark them an explicitly installed, where would pacman say they came from?

Well, if you install X, then Y as a dependency of X, the database remembers that X requires Y and that Y requires X, doesn't it ?

If you happened to explicitly install them as a precursor to installing another package that required them, you'd basically have to just remember that you did that in order for the second feature to be useful anyway.  I guess I don't get what the advantage would be despite causing database confusion.

It may become difficult to remember everything over the time. The bug report you link to says there will be an option to show what explicit packages are leaves of the dependency tree, this seems to solve my problem (partially). I want to have a list of packages I really installed and still want, which is easy to maintain.

Offline

#5 2007-10-14 09:08:48

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: Remove "explicitly installed" mark on packages

remyoudompheng wrote:

- an option to list explicitly installed packages

As already stated, pacman -Qe in 3.1 .

- an option taking package names as arguments which would mark them as non-explicitly installed (so that if they are actually orphaned `pacman -Qe` list them)

Not sure why you would want to do that. But if the install reason field is wrong for some packages, you can just use pacman -Qt in 3.1 to display all orphans, no matter what the reason field is. This displays many packages though (99 here), and I don't want to remove any of them.

Otherwise, see http://bugs.archlinux.org/task/7193
-> pacman -S --asdeps <packages>

This option is mostly used by makepkg -sS, so that dependencies installed from the repos are indeed marked as dependencies.
When the dependencies are also in AUR though, you'll probably need to use --asdeps manually. But maybe yaourt will be able to handle that once pacman 3.1 is released.


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

Board footer

Powered by FluxBB