You are not logged in.

#1 2023-03-08 10:34:06

Antone Morris
Member
Registered: 2023-03-08
Posts: 9

[SOLVED] Edit list of installed packages

Excuse me, I was wondering if you could help me with something.

I would like to know how I can edit the list of installed packages on my Arch Linux system.
A list, for:
want to use it to remove packages that I do not want to see appear in the list of packages to be updated.


Solution:
/var/lib/pacman/local
The list of installed packages is located in the directory:
/var/lib/pacman/local

Last edited by Antone Morris (2023-03-08 13:35:43)

Offline

#2 2023-03-08 11:49:47

tucuxi
Member
From: Switzerland
Registered: 2020-03-08
Posts: 291

Re: [SOLVED] Edit list of installed packages

You can add and remove packages using the package manager, pacman. You don’t edit a list of packages, if that is what you mean. Instead, you tell pacman to install and remove packages.

Offline

#3 2023-03-08 11:56:04

Antone Morris
Member
Registered: 2023-03-08
Posts: 9

Re: [SOLVED] Edit list of installed packages

@tucuxi
Thank you for your response, but I am specifically looking for information on how to edit the list of installed packages.
While I appreciate your help, I should mention that I am not a beginner.

Last edited by Antone Morris (2023-03-08 11:56:28)

Offline

#4 2023-03-08 12:19:32

sydneyj
Member
From: Texas, US
Registered: 2018-10-20
Posts: 24

Re: [SOLVED] Edit list of installed packages

Use pacman's query command to send the list to a text file, then edit.  I am not aware of any way to change pacman's innate list.

Offline

#5 2023-03-08 13:01:14

Antone Morris
Member
Registered: 2023-03-08
Posts: 9

Re: [SOLVED] Edit list of installed packages

There must be a place where the handling (list) of packages exists.
I was asking myself where the package list is stored or managed.

Offline

#6 2023-03-08 13:09:14

d.ALT
Member
Registered: 2019-05-10
Posts: 959

Re: [SOLVED] Edit list of installed packages

You mean this?

WIKI wrote:

Most likely, pacman's database of installed software, /var/lib/pacman/local, has been [...]

(https://wiki.archlinux.org/title/Pacman … l_database)


<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

#7 2023-03-08 13:13:13

sydneyj
Member
From: Texas, US
Registered: 2018-10-20
Posts: 24

Re: [SOLVED] Edit list of installed packages

The database is /var/lib/pacman/local.  All of this is in the wiki.  You're sure you're not a beginner?

Edit: ninja'd

Last edited by sydneyj (2023-03-08 13:14:22)

Offline

#8 2023-03-08 13:16:58

Antone Morris
Member
Registered: 2023-03-08
Posts: 9

Re: [SOLVED] Edit list of installed packages

/var/lib/pacman/local

That's a correct answer.
That's the right answer. The list of installed packages is located in the directory:
/var/lib/pacman/local

Offline

#9 2023-03-08 13:27:43

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,471
Website

Re: [SOLVED] Edit list of installed packages

That's not a list, it's a bunch of files.  And you can't (read shouldn't) edit those directly as doing so will almost certainly not have the effect you want.

Surely this is some sort of X-Y question.  `pacman -Q` or `pacman -Qq` is a better way of getting a list of installed packages.

Last edited by Trilby (2023-03-08 13:28:49)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#10 2023-03-08 13:34:27

Antone Morris
Member
Registered: 2023-03-08
Posts: 9

Re: [SOLVED] Edit list of installed packages

@Trilby

This is a list, as the function 'I want for it'; I want to use it to remove packages that I do not want to see appear in the list of packages to be updated.

Last edited by Antone Morris (2023-03-08 13:34:57)

Offline

#11 2023-03-08 13:37:49

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,255

Re: [SOLVED] Edit list of installed packages

? the Y becomes bigger. Are you attempting to do partial upgrades? There is a much simpler already existing mechanism for that called IgnorePkg in your pacman.conf and it should also not  be used if you don't know what you're doing since partial upgrades are not supported

What is your end goal? What do you want to accomplish at the end of this?

Offline

#12 2023-03-08 13:39:34

headkase
Member
Registered: 2011-12-06
Posts: 1,986

Re: [SOLVED] Edit list of installed packages

Antone Morris wrote:

@Trilby

This is a list, as the function 'I want for it'; I want to use it to remove packages that I do not want to see appear in the list of packages to be updated.

Do you know of this?

pacman -Ss <packagename> | grep -i installed

Replace <packagename> with the one you're interested in then pipe that to a case insensitive grep to show if that name is installed.  If no match is installed then it prints nothing.  The "-Ss" option in pacman matches out of the pacman database.

Last edited by headkase (2023-03-08 13:43:02)

Offline

#13 2023-03-08 13:48:14

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,255

Re: [SOLVED] Edit list of installed packages

If you are going for that you can already opt for

pacman -Qs packagename

and other -Q variations which will limit itself to the installed/local packages

Offline

#14 2023-03-08 13:51:07

headkase
Member
Registered: 2011-12-06
Posts: 1,986

Re: [SOLVED] Edit list of installed packages

V1del wrote:

If you are going for that you can already opt for

pacman -Qs packagename

and other -Q variations which will limit itself to the installed/local packages

Thanks, wasn't aware of that alternate: I've always used -Ss.

Offline

#15 2023-03-08 14:04:37

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,471
Website

Re: [SOLVED] Edit list of installed packages

So you deleted directories from the local database path.  If you had read the pacman man page, you'd have not only found the IgnorePkg option as noted above, but also the --dbonly which would have been a cleaner way to acheive the breakage that you seem to want.  But of course, you are not a beginner, so feel free to continue ignoring man pages and breaking your system.  Just be sure to mention these points in any other help request you post on these forums as this this will cause all sorts of problems.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#16 2023-03-08 14:29:39

Antone Morris
Member
Registered: 2023-03-08
Posts: 9

Re: [SOLVED] Edit list of installed packages

--dbonly
adds or removes the database entry only, leaving all files in place.

Thank you,
I didn't know about this option. However, I prefer installing packages manually, as it allows me to keep a copy.

Offline

#17 2023-03-08 15:39:32

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,358

Re: [SOLVED] Edit list of installed packages

pacman actually has a cache and nothing here has anything to do with "installing packages manually" - whatever that shall mean (-U?)
There seems a lot of stuff that is surprisingly new to somebody who's "not a beginner" and teh way it looks you're essientially fighting the package manager to do something™.

You can reveal what something™ is or not, but for now: what ever you're trying to do there, you're doing it wrong.

Offline

#18 2023-03-08 16:35:33

Antone Morris
Member
Registered: 2023-03-08
Posts: 9

Re: [SOLVED] Edit list of installed packages

@seth
Thank you for making an effort to understand 'my reasoning'. I prefer to have complete control over my operating system and customize it according to my preferences. Therefore, I would like to have the freedom to make changes as I see fit.

I appreciate that moral considerations don't factor into the management of my operating system. I prefer to keep technical and ethical matters separate, so I can make decisions based solely on what is most efficient and effective for my system.

Thank you for sharing your perspective on how you think an operating system should be managed.

I'm glad you came, it shows that there is not only one 'way' to consider things

Offline

#19 2023-03-08 16:45:33

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,358

Re: [SOLVED] Edit list of installed packages

This is not about moral or ethics. What you do is wrong on (likely several) techincal levels.
You're essentially butchering through the package database for undeclared reasons and you chose a fence post as tool for that.

Trilby has already pointed it out, but maybe the concept isn't clear to you: https://en.wikipedia.org/wiki/XY_problem

Offline

#20 2023-03-08 18:44:41

Antone Morris
Member
Registered: 2023-03-08
Posts: 9

Re: [SOLVED] Edit list of installed packages

"This is not about moral or ethics. What you do is wrong on (likely several) techincal levels."

Thank you once again for reiterating your point of view. I believe that there are multiple valid approaches to technical matters, and what works for one person may not work for another, as there is not only a brain. I understand that you have your own approach, and I have mine, and both are effective in their own way.

The XY problem is a common issue in problem-solving and occurs when someone is trying to solve a problem X, but instead of asking for help with X, they ask for help with a solution Y that they believe will solve X.

Which is not what is happening.

The packages I remove, I remove them, because I know the non-incidence of their removal on the system.

Offline

#21 2023-03-08 19:38:20

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,727

Re: [SOLVED] Edit list of installed packages

This is most definitely xy problem. If you tell us what you're actually trying to accomplish, we can tell you the best way to do it. Deleting things from the database is a means to an end, not the end itself.

Online

#22 2023-03-08 19:41:35

Antone Morris
Member
Registered: 2023-03-08
Posts: 9

Re: [SOLVED] Edit list of installed packages

@Scimmia

I appreciate your willingness to help. Rest assured that my problem has been resolved, or I wouldn't have marked the post [SOLVED]. Thank you for your time and assistance.

Last edited by Antone Morris (2023-03-08 19:42:02)

Offline

#23 2023-03-10 20:59:08

yochananmarqos
Member
Registered: 2020-02-05
Posts: 222

Re: [SOLVED] Edit list of installed packages

Trilby wrote:

Surely this is some sort of X-Y question.

Yes, it is.

Antone Morris wrote:

I want to use it to remove packages that I do not want to see appear in the list of packages to be updated.

Translation:

I want to use it to ignore packages that I do not want to be updated.


Partial upgrades are unsupported: https://wiki.archlinux.org/title/System … nsupported

Offline

#24 2023-03-10 23:09:54

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: [SOLVED] Edit list of installed packages

The OP has marked this solved and has repeatedly dismissed concerns about what he is doing. Closing.

Offline

Board footer

Powered by FluxBB