Both sides previous revisionPrevious revisionNext revision | Previous revision |
pacman [2021/03/29 15:15] – reshuffle, another fix, tips for .pacnews rjt | pacman [2024/09/15 19:54] (current) – [Maintenance] rjt |
---|
===== 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 ditch 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. | 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. |
| |
''-S [group name]-{[name1],name2],[etc]}'' | ''-S [group name]-{[name1],name2],[etc]}'' |
=== .pacnew === | === .pacnew === |
| |
There are tools to manage ''.pacnew'' files that are created when core config files are updated FIXME | There are tools to manage ''.pacnew'' files that are created when core config files are updated. |
| |
| * [[https://wiki.archlinux.org/title/Pacman/Pacnew_and_Pacsave#Managing_.pac*_files|Managing .pac* files]] |
| |
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. | 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'' | 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 ==== |
| |
===== Fixes ===== | ===== 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]]. |
| |
| I was getting this error: ''warning: Public keyring not found; have you run 'pacman-key --init'?'' which was mucking up the upgrade process. These steps fixed it: |
| |
| - ''sudo rm -r /etc/pacman.d/gnupg'' |
| - ''sudo pacman-key --init'' |
| - ''sudo pacman-key --populate archlinux'' |
| - ''sudo pacman -S archlinux-keyring'' |
| |
==== AUR ==== | ==== AUR ==== |
| |
[[trizen]] and [[yay]] seem to be the helpers to go for now. | [[trizen]] and [[yay]] seem to be the helpers to go for now. |
| |
==== Free Space ==== | |
| |
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. | |
| |
To find orphan packages ''pacman -Qdt'' | |
| |
==== Missing Files in Pacman Database ==== | ==== Missing Files in Pacman Database ==== |