User Tools

Site Tools


pacman

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
tool:software:pacman [2020/06/30 06:49] – created - moved stuff over from the arch page rjtpacman [2022/08/17 14:59] (current) – [Keys] update, auto keyring update rjt
Line 3: Line 3:
 **Pacman** is the package management tool that comes with [[arch_linux]]. **Pacman** is the package management tool that comes with [[arch_linux]].
  
-It is very important to change the progress bar to look like [[person:Pacman]] eating dots. You do this by editing ''/etc/pacman.conf'', adding the line 'ILoveCandy' to the ''[options] > # Misc options'' section. Make sure you have colour enabled too.+It is very important to change the progress bar to look like Pacman eating dots. You do this by editing ''/etc/pacman.conf'', adding the line 'ILoveCandy' to the ''[options] > # Misc options'' section. Make sure you have colour enabled too.
  
 ===== Usage ===== ===== Usage =====
  
 +I'll leave out the basics like ''-Syu'', ''-S'', ''-Ss'' and ''-Rsn''((But hey, in case you didn't know what the ''s'' and ''n'' are doing there: ''s'' include deps. not needed by anything else, ''n'' also ditches config. files (but not the ones in your home directory))); here're some ones I don't use as much / forget, but are real useful.
  
-===== Fixes =====+''-S [group name]-{[name1],name2],[etc]}''
  
-==== AUR ==== +''-Qs''
-=== .SRCINFO and PKGBUILD mismatch ===+
  
-Errors like+''-Ql''
  
-  :: [package name] package(s) failed to install. +''-Qo [/path/to/file_name]''
-  :: ensure package version does not mismatch between .SRCINFO and PKGBUILD +
-  :: ensure package name has a VCS suffix if this is a devel package+
  
-Are are [[pacaur]] problemand can get gotten round by installing manually, or by using another helper+''Q'' does stuff on installed packagesyou can replace with ''F'' to do the same actions on stuff you haven't installed.
  
-[[Trizen]] and [[YAY]] seem to be the helpers to go for now.+I also have an alias for my helper, so I type ''pact -[flags]'' to do stuff. 
 + 
 +===== Tips ===== 
 + 
 +==== Maintenance ==== 
 +=== .pacnew === 
 + 
 +There are tools to manage ''.pacnew'' files that are created when core config files are updated FIXME 
 + 
 +I just use [[vim#vimdiff]] to check difference between the current and new files. You could also just use ''vim -d [file] [file]''. ''Ctrl+w [left or right arrow]'' to switch window, btw. 
 + 
 +You can get a nice list of ''.pacnew''s with ''find /etc -regextype posix-extended -regex ".+\.pac(new|save)" 2> /dev/null'' 
 + 
 +=== Freeing Space === 
 + 
 +To clear Pacman's cache ''pacman -Sc''
 + 
 +You can use Paccache (in [[arch>community/x86_64/pacman-contrib/pacman-contrib/|pacman-contrib]]) to have better control over what you do with cached packages. Egs.: ''paccache -rk 2'' will delete everything except the last two versions of a package. ''paccache -ruk0'' will remove everything for packages that are no longer installed. 
 + 
 +To find orphan packages ''pacman -Qdt''
  
 ==== Converting Packages ==== ==== Converting Packages ====
Line 32: Line 49:
   - ''$ debtap -p [deb file]'' to make the PKGBUILD   - ''$ debtap -p [deb file]'' to make the PKGBUILD
  
-  * [[git>helixarch/debtap]]+  * [[github>helixarch/debtap]]
   * [[aur>debtap]]   * [[aur>debtap]]
  
Line 40: Line 57:
 === RPM === === RPM ===
  
-==== Free Space ==== +==== Speeding Up Package Building ==== 
-To clear Pacman's cache ''pacman -Sc'' --- you can use ''paccache -rk 2'' to delete everything except the last two versions of a package, //which is a good idea//. ''paccache -ruk0'' will remove everything for packages that are no longer installed.+  * [[archw>Makepkg]] 
 +    * [[archw>Makepkg#Improving_compile_times]] 
 +    * [[archw>Makepkg#Utilizing_multiple_cores_on_compression]]
  
-To find orphan packages ''pacman -Qdt''+===== Fixes ===== 
 + 
 +==== Keys ==== 
 + 
 +If you get errors about keys (and things like files being corrupt), try updating ''archlinux-keyring'' before doing a full update. EG: (''sudo pacman -Sy archlinux-keyring && sudo pacman -Su''. You might want to chuck that in an alias. 
 + 
 +nbjp [[https://monthly-reports.archlinux.page/2022/07/|Apparently Arch now updates the keyring weekly]]. 
 + 
 +==== AUR ==== 
 +=== .SRCINFO and PKGBUILD mismatch === 
 + 
 +Errors like 
 + 
 +  :: [package name] package(s) failed to install. 
 +  :: ensure package version does not mismatch between .SRCINFO and PKGBUILD 
 +  :: ensure package name has a VCS suffix if this is a devel package 
 + 
 +Are a [[pacaur]] problem, and can get gotten round by installing manually, or by using another helper 
 + 
 +[[trizen]] and [[yay]] seem to be the helpers to go for now.
  
 ==== Missing Files in Pacman Database ==== ==== Missing Files in Pacman Database ====
 +
 Just ran into a little problem where a disk error took out a bit of my pacman database. Just ran into a little problem where a disk error took out a bit of my pacman database.
  
Line 52: Line 91:
 Thanks to [[https://bbs.archlinux.org/viewtopic.php?pid=1724969#p1724969|this post]] I solved it by deleting the packages directory in ''/var/lib/pacman/local'', and reinstalled the database only with ''pacman -U --dbonly [package].pkg.tar.xz'' Thanks to [[https://bbs.archlinux.org/viewtopic.php?pid=1724969#p1724969|this post]] I solved it by deleting the packages directory in ''/var/lib/pacman/local'', and reinstalled the database only with ''pacman -U --dbonly [package].pkg.tar.xz''
  
-==== Speeding Up Package Building ==== +==== Broken Pacman After Partial Upgrade ==== 
-  * [[archw>Makepkg]] + 
-    * [[archw>Makepkg#Improving_compile_times]] +When doing a partial upgrade to get my keyring in order before a proper upgrade I mistakenly upgraded pacman too. This ca'us an error where the version of glibc that pacman needed was out of whack with the one I had installed, so pacman would not work at all. 
-    * [[archw>Makepkg#Utilizing_multiple_cores_on_compression]]+ 
 +To fix this I downloaded a //static// version of pacman and ran a fresh ''pacman -Syu'' and that fixed everything. 
 + 
 +See: https://old.reddit.com/r/archlinux/comments/lz7777/pacman_broken_due_to_glibc/
  
 ===== See Also ===== ===== See Also =====
  
-{{tag>fixes linux}}+  * [[arch_linux]] 
 + 
 +{{tag>fixes linux software package-manager}}
  
  
pacman.txt · Last modified: 2022/08/17 14:59 by rjt