You are not logged in.
I am trying to backup my list of installed packages. I used the command "pacman -Qqe" (for all); "pacman -Qqem" (for foreign packages) and "pacman -Qm" (for AUR) but some of them are not on the list, such as: gstreamer, phonon-qt5-gstreamer, gst-libav, gst-plugin-bad, gst-plugin-bad-libs and so on, all from EXTRA repository. What should I do?
Last edited by rikcardo (2020-04-07 12:57:19)
Offline
The second command for "foreign" packages and the third for AUR are redundant. Any difference between the results of those two is because one just list package names ('q') and also only lists explicit packages ('e'). The packages that are not on any of the lists have nothing to do with being from the extra repo, the extra repo is included in your first command. They are not listed as they are dependencies of other packages you have installed - they will be pulled in when you install your list of packages.
The results of `pacman -Qqen` will get you all explicitly installed native (repo) packages, and `pacman -Qqem` will get all explicitly installed AUR packages. These two lists are all you will need to install on a new system to get back to where you are.
Last edited by Trilby (2020-04-06 03:11:31)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
...they will be pulled in when you install your list ...
Thanks, Trilby, the problem is that I installed it on another PC by importing the package list, but these (extra) packages were not included and I had to search the original PC for the missing plugins and install them separately. Is there any way to get a list of these installed dependencies?
Offline
If you consider those packages as required change the install reason on the original installation to explicitly-installed.
Otherwise you could find all packages installed on the original installation from repositories that are marked as dependencies.
Find packages in that list not installed on the new installation to avoid changing the install reason of those packages. Install the packages remaining in the list.
Last edited by loqs (2020-04-06 21:00:49)
Offline
Clean up orphan packages regularly. All the missing packages were not explicitly installed and were not a dependency of any explicitly installed packages; that's the only reason they fell through the cracks. But on a well-maintained system, there should be no such packages.
Periodically check the output of `pacman -Qdtq`. If there are any results, determine whether those packages should be removed or explicitly installed. If you do this clean up on the initial system first, then the resulting package list will work for the reinstall.
Last edited by Trilby (2020-04-06 22:07:36)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
I used Pamac to mark those packages as explicitly installed and now I can see them on the list. Do you know how I can do this in the command line?
Offline
man pacman"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
OPERATIONS
-D, --database
Operate on the package database. This operation allows you to modify certain
attributes of the installed packages in pacman’s database. It also allows you to
check the databases for internal consistency. See Database Options below.
DATABASE OPTIONS (APPLY TO -D)
--asexplicit <package>
Mark a package as explicitly installed; in other words, set their install reason
to be explicitly installed. This is useful it you want to keep a package
installed even when it was initially installed as a dependency of another
package.
Thank you, Trilby.
Last edited by rikcardo (2020-04-07 10:28:31)
Offline
I used the following command to find the packages with reference to the keyword, filtered the repository and checked if it was installed.
pacman -Ss keywordPackage | grep extra | grep installedAnd than:
sudo pacman -D --asexplicit namePackageIt worked!
Offline
There's no need to grep for "extra" there. The fact that the problematic packages in your first post were from the [extra] repository is just a coincidence. This could happen with packages from any repo.
The key is to look for orpans that you have installed: `pacman -Qdtq`. Then determine if you actually want to keep any of these. On a well maintained system, `pacman -Qtdq` should return no results at all. If there are any results, remove the ones you don't need and flag the ones you do need as explicit. If there is one you need and 6 you don't, flag the one you need as you did above, then just `pacman -Qdtq | pacman -Rsn -` to remove the remaining ones.
Also note that you should generally not remove packages with just `pacman -R $pkgname` as that can result in many orphaned packages that need to be cleaned up. You should read about the Removal flags -s and -n and decide if they are right for you (I use `pacman -Rsn $pkgname` every time I remove something).
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline