You are not logged in.
Pages: 1
Topic closed
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
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
@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
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
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
You mean this?
Most likely, pacman's database of installed software, /var/lib/pacman/local, has been [...]
<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
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
/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
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
@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
? 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
@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 installedReplace <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
If you are going for that you can already opt for
pacman -Qs packagenameand other -Q variations which will limit itself to the installed/local packages
Offline
If you are going for that you can already opt for
pacman -Qs packagenameand 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
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
--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
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
@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
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
"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
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
@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
Surely this is some sort of X-Y question.
Yes, it is.
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
The OP has marked this solved and has repeatedly dismissed concerns about what he is doing. Closing.
Offline
Pages: 1
Topic closed