linub
14 January 2024 19:13
1
or is not possible due to different installations(kernel,desktop environment,minimal vs full etc).
I’m asking because i deleted some packages after uninstalling a program without paying enough attention
i mean everything works for now,but i may have a hole in the roof or a missing brick.
zbe
14 January 2024 19:27
2
linub:
i deleted some packages
Deleted how? There is pacman -Qk
or -Qkk
, consult manpages for more info. But if you uninstalled something, then you uninstalled it, nothing to check for.
1 Like
cscs
14 January 2024 19:37
3
This was asked recently;
-Dkk will perform on the repos, what is available, not what you have.
Something more like what OP is asking for might be
pacman -Qkk | grep -v '0 altered files'
Though I fear what this will mean for people looking at the output.
Its likely there willl be ‘modified’ files or ‘mismatched time’ etc that is ignorable.
Well, the single Dk
pacman -Dk
will report big goofs like missing dependencies… though that will likely only happen if someone did -Rdd manually.
Except …
Thats really a different question.
You dont need to verify package integrity.
You want to see which packages you removed.
You could look at something like
grep -i removed /var/log/pacman.log
Unless you used something like -Rdd
then maybe you would want
pacman -Dk
Which regularly wont show much … but if you did remove with ‘force ignore dependency checks’ … -Dk
will report missing deps.
1 Like
-Rdd does ignore dependencies but does not remove them.
cscs
14 January 2024 20:11
5
…?..
Yeah … -d
ignores deps. Double skips all.
-d, --nodeps
Skips dependency version checks. Package names are still checked. Normally, pacman will always check a package’s dependency fields to ensure that all dependencies are
installed and there are no package conflicts in the system. Specify this option twice to skip all dependency checks.
In the context of a removal operation (-Rdd
) that means dependencies are ignored during removal.
So instead of
$ sudo pacman -Rsn python
error: failed to prepare transaction (could not satisfy dependencies)
:: removing python breaks dependency 'python' required by amdonly-gaming-vulkan-mesa-layers
:: removing python breaks dependency 'python' required by dbus-python
:: removing python breaks dependency 'python' required by fwupd
:: removing python breaks dependency 'python' required by inkscape
:: removing python breaks dependency 'python' required by libixion
[...]
Something like
sudo pacman -Rdd python
Would work and python would be removed.
This is a special operation that would need to have been performed manually.
But if someone did do something like that … then
pacman -Dk
Would then report something like
$ pacman -Dk
error: missing 'python' dependency for 'dbus-python'
[...]
All of the above the reason for
You can also look for orphans after -Rdd if there are none, all the dependencies are still needed.
cscs
14 January 2024 20:18
7
Orphans can be created by removal … but orphans are not the same thing.
If I removed python that does not make dbus-python
an orphan … it just means python
is missing, no orphan was created.
To print orphans;
pacman -Qdt
You can also print even more orphans by using the t
flag twice.
Maybe they should have a special name … like step-orphans or something.
These are packages that would otherwise be considered orphans if not for optional dependencies.
Quote from man pacman
-t, --unrequired
Restrict or filter output to print only packages neither required nor optionally required by any currently installed package. Specify this option twice to include
packages which are optionally, but not directly, required by another package.
So:
pacman -Qdtt
cscs:
pacman -Qdt
Quite honestly I would never suggest someone uses -Rdd for python. If for a python problem I would use downgrade .
cscs
14 January 2024 20:39
9
I didnt suggest anyone use -Rdd
The point was to answer the question as presented by OP…
Which itself is not very explanatory but speaks to them doing some kind of removal they wish they had not.
So responses and explanations pertain to that.
Like mine:
cscs:
This was asked recently;
-Dkk will perform on the repos, what is available, not what you have. Something more like what OP is asking for might be pacman -Qkk | grep -v ‘0 altered files’ Though I fear what this will mean for people looking at the output. Its likely there willl be ‘modified’ files or ‘mismatched time’ etc that is ignorable. +1 Well, the single Dk pacman -Dk will report big goofs like missing dependencies… though that will likely only happen if someone did -Rdd manually.
Except …
Thats really a different question.
You dont need to verify package integrity.
You want to see which packages you removed.
You could look at something like
grep -i removed /var/log/pacman.log
Unless you used something like -Rdd
then maybe you would want
pacman -Dk
(then you made some statement about what -Rdd is, and I responded, then you mentioned orphans, so I explained more, then you say dont do removals like that … and now we are here)
But…
In case it needs saying for whatever reason.
No one should be using -Rdd
unless they really really know what they are doing.
linub
14 January 2024 22:12
10
this is what i needed:
grep -i removed /var/log/pacman.log
Thanks!
i should’ve said removed/uninstalled, not deleted.
system
Closed
15 January 2024 01:12
11
This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.