[MAQeia] Software / package management hints

Here you'll find the "Mostly Asked Questions" about Mageia.

Before getting to support forum, have a look here... there are great chances that MAQeia can help...

[MAQeia] Software / package management hints

Postby doktor5000 » Jan 17th, '13, 23:58

For software management under Mageia in general please have a look at the documentation:
Documentation about software management in Mageia wiki
Documentation about software management for beginners in Mageia wiki
Documentation about software management in Mageia Control Center (aka MCC)


Other useful commands related to package management, in no particular order:

List history of installed packages since the installation of Mageia:
Code: Select all
rpm -qa --last


A more fine-grained history (for all packages since Mageia installation) including which program triggered installation/removal can be seen with the following command run as root (or grant your user journalctl permissions, just add your user to the systemd-journal group)
Code: Select all
journalctl -a --no-pager | grep -F "[RPM]"


same as above, but limited to all packages installation/removal since the last two boots:
Code: Select all
journalctl -a -b-2 --no-pager | grep -F "[RPM]"


To list active repos:
Code: Select all
urpmq --list-media active

To list all configured repos including disabled repos:
Code: Select all
urpmq --list-media

To list all configured repos and their URLs:
Code: Select all
urpmq --dump

or
Code: Select all
urpmq --list-url


Those can also be combined:
Code: Select all
urpmq --list-media active --list-url


If instead of an URL you see something about mirrorlist, the following command will show the first 5 mirrors it will try (sorting ascending by geological proximity)
Code: Select all
grep url /var/cache/urpmi/mirrors.cache | head -5

Mirrorlist is a mechanism which takes a list of all available Mageia mirrors (which can be seen at http://mirrors.mageia.org/ ) and, using geolocation, tries to automatically choose those mirrors first which are near you current location and give the fastest reponses. This may not work always that well, as some mirrors sync not that often.

To enable media (e.g. nonfree&tained _release and _updates repos) use urpmi.update --no-ignore followed by urpmi.update -a. All in one:
Code: Select all
urpmi.update --no-ignore "Tainted Release" && urpmi.update --no-ignore "Tainted Updates" && urpmi.update --no-ignore "Nonfree Release" && urpmi.update --no-ignore "Nonfree Updates" && urpmi.update -av


To query the URL on mirror for a given package name, use
Code: Select all
urpmq --sources packagename


To search in package names, and ignore case sensitivity (urpmi does respect case by default) use
Code: Select all
urpmf -i --name packagename


To configure your repos from one particular mirror and not use mirrorlist, use the following commands to remove all repositories and add a complete set of repositories from one specific mirror (in the example ftp.nluug.nl is used )
Code: Select all
urpmi.removemedia -a
urpmi.addmedia --distrib 'ftp://ftp.nluug.nl/pub/os/Linux/distr/mageia/distrib/$VERSION/$ARCH'


To show all packages, which are currently installed but not available from the currently configured repositories (good way to show 3rd party packages or libaries/packages that don't exist anymore, e.g. after a distro version upgrade
Code: Select all
urpmq --not-available


To check dependencies of all installed packages (similar to yum check command)
Code: Select all
rpm -Va --nodigest --nofiles --noscripts --nosignature --nolinkto --nofiledigest --nosize --nouser --nogroup --nomtime --nomode --nordev


To download all installed packages (or all packages from a textfile, but they must be currently installed - simply replace /var/log/rpmpkgs with the path to that file)
Code: Select all
for pkg in $(cat /var/log/rpmpkgs | sed 's/.rpm$//'); do urpmi --replacepkgs --no-install ${pkg};done


To download packages from a list, which are not currently isntalled
Code: Select all
for pkg in $(cat file_with_rpm_filenames | sed 's/.rpm$//'); do urpmi --download-all --force --no-install ${pkg};done

check viewtopic.php?f=7&t=6901 for more information about this.


To search for a package name or part of a package name, and to show the full name and version for the packages in the results and in which repository those packages are contained
Code: Select all
urpmf -f --name -m part_of_packagename


Tell urpmi to be verbose, useful in case of package installation/update errors to see the underlying dependency solver and why it really fails or does not what you expect it to do
Code: Select all
urpmi --debug


To debug circular dependencies, since Mageia 4 there is a new option to help with that:
Code: Select all
urpmi --deploops


To simply mark all orphaned packages as manually installed, one can use e.g.
Code: Select all
urpmi $(urpmq --auto-orphans)

WARNING: This is only listed here for completeness' sake, see https://wiki.mageia.org/en/Removing_packages for more details regarding orphans, context information and also a tool for orphan management

To install all required packages to build a given src.rpm one can also use urpmi (also on remote packages, as rpm can do it too)
Code: Select all
urpmi --buildrequires http://ftp.nluug.nl/pub/os/Linux/distr/mageia/distrib/cauldron/SRPMS/core/release/2mandvd-1.8.4-6.mga4.src.rpm


To print the full URL to any given packages
Code: Select all
urpmi --sources packagename


To skip any packages during updates/installation
Code: Select all
urpmi --skip packagename



To skip packages permanently, add them into /etc/urpmi/skip.list - for more details see also man urpmi.files


Also see
Code: Select all
man urpmihowto
and https://wiki.mageia.org/en/URPMI for more information or ask here, information will be added when requested as necessary.
Last edited by doktor5000 on Aug 26th, '14, 22:12, edited 11 times in total.
Reason: added explanations, added commands, completed, added check and download commands, added some more
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 16080
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: [MAQeia] Software / package managment hints

Postby eor2004 » Jan 26th, '14, 01:10

Thank you Doc for the wiki link, I have read it and installed "qt4urpm" tool, that tool is one marvelous tool to manage the orphaned packages, very easy, congratulations to the creators of "qt4urpm" for one of the most useful tools available for mageia! :D
Mageia 3 64-bit KDE
Gigabyte G41M-ES2L--> 3GB Ram
Intel Pentium Dual Core 2.60Ghz
Western Digital 500GB HDD--> XFS Filesystem
eor2004
 
Posts: 32
Joined: Jun 16th, '11, 20:10
Location: Puerto Rico

Re: [MAQeia] Software / package managment hints

Postby doktor5000 » Jan 26th, '14, 01:39

Why do you need to "manage" the orphans at all?
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 16080
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: [MAQeia] Software / package managment hints

Postby eor2004 » Jan 28th, '14, 06:37

I just used the "qt4urpm" tool to mark all the orphaned packages as "not orphaned" because I didn't wanted anymore to be prompted everytime I install or remove programs to remove the orphaned packages!

Doc, now that you ask why I need to manage the orphaned packages, from the system stability point of view, it is wrong to mark the orphaned packages as not orphaned???
Mageia 3 64-bit KDE
Gigabyte G41M-ES2L--> 3GB Ram
Intel Pentium Dual Core 2.60Ghz
Western Digital 500GB HDD--> XFS Filesystem
eor2004
 
Posts: 32
Joined: Jun 16th, '11, 20:10
Location: Puerto Rico

Re: [MAQeia] Software / package managment hints

Postby doktor5000 » Jan 28th, '14, 12:47

System stability doesn't care about orphans.

And marking orphans un-orphaned can be done with one command, no need to click through all packages:
Code: Select all
urpmi $(urpmq --auto-orphans)
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 16080
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: [MAQeia] Software / package management hints

Postby theoldrailroader » Oct 6th, '14, 21:00

Hint me this if you would please. Now that I've learned to install programs correctly... When complete, I receive the "you may want to delete" message, also (and I assume, obviously) and am wondering if there is a reason to NOT remove the orphans and if no harm is done, what app would make this a simple process?
theoldrailroader
 
Posts: 8
Joined: Oct 4th, '14, 05:04

Re: [MAQeia] Software / package management hints

Postby doktor5000 » Oct 6th, '14, 21:19

Yep, mentioned shorty in bright red:
doktor5000 wrote:WARNING: This is only listed here for completeness' sake, see https://wiki.mageia.org/en/Removing_packages for more details regarding orphans, context information and also a tool for orphan management
Please do read that wiki page, and simply ignore the message about orphans.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 16080
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: [MAQeia] Software / package management hints

Postby theoldrailroader » Oct 6th, '14, 21:48

Hey, man... I just wanted to drain the swamp and now I'm up to my butt in aligators! I'm not trying to wimp out here when I ask a dumb question because I've stared at the screen for a while looking for answers. It just seems I'm almost always looking somewhere else. I am not familiar with a lot of the resources available so your finger point (as above) really helps with my frustration level. I appreciate your responses. I've had lots of terse answers from people I will probably test your resolve more. I don't plan on staying ignorant forever... Again, Thank You!
theoldrailroader
 
Posts: 8
Joined: Oct 4th, '14, 05:04

Re: [MAQeia] Software / package management hints

Postby doktor5000 » Oct 6th, '14, 22:30

Hope I understood your answer correctly, it helped a bit? :)

In any case, if you want more explanations, or if you have more open questions, do not hesitate to ask.
I actually appreciate it more when people ask beforehand, instead of only asking when they created some problems themselves somehow ...
The former is usually much shorter to solve, compared to the latter - which sometimes takes several pages of a forum thread to sort out :|
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 16080
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany


Return to MAQeia

Who is online

Users browsing this forum: No registered users and 1 guest