Linux/Unix Package Management¶
Where is your package?¶
locate the binary, source, and manual page files for a command
Homebrew¶
Handling multiple versions¶
See Manage multiple versins of Go on MacOS with Homebrew | Github Gist
Install a version
Switch a version
Suppose you have the current version of go
and go@1.19
installed and you want to switch from go
to go@1.19
apt¶
find package¶
find package
find files in package
https://unix.stackexchange.com/q/114533/
https://unix.stackexchange.com/a/330069
The following packages have been kept back¶
tldr:
sudo apt dist_upgrade
sudo apt full-upgrade
sudo apt install <kept back packages>
long:
displayed when doing apt upgrade
solved by
according to https://askubuntu.com/a/602 this is not an ideal solution
about dist-upgrade:
dist-upgrade intelligently handles changing dependencies with new versions of packages
can also use apt full-upgrade
(es el versión nuevo)
aptitude¶
Built on apt-get, apt-mark, and apt-cache, super fast.
sudo aptitude update
sudo aptitude fullupgrade
sudo aptitude autoclean
pacman¶
install package¶
install from tar.xz
update & upgrade all¶
remove package¶
remove cache¶
remove all uninstalled packages in cache (s.t. you can downgrade easily)
remove all packages in cache
autoremove (remove orphan packages)¶
https://wiki.archlinux.org/title/Pacman/Tips_and_tricks#Removing_unused_packages_(orphans)
list all packages¶
search package¶
# match and show description
pacman -Qs <pkg>
# exact match
pacman -Q <pkg>
# exact match and show details
pacman -Si <pkg>
troubleshooting¶
error: GPGME error: No data¶
Do something with pacman but have this error
do this to fix
https://stackoverflow.com/a/67850084/15493213
error: failed to commit transaction (invalid or corrupted package)¶
When upgrading packages
do
https://unix.stackexchange.com/a/574496
yay¶
to install (unofficial) AUR packages
install
yum¶
yum-config-manager¶
to use yum-config-manager
see all repos¶
go to /etc/yum.repos.d/
snap¶
install local¶
https://askubuntu.com/a/1397306
flatpak¶
init¶
install flatpak
and rebootadd flathub
install¶
install your flatpak app
update¶
update all flatpak packages
autoremove¶
remove unused packages
Appimage¶
Make Appimage appears as native files¶
Use AppimageLauncher
Install
sudo apt install software-properties-common
sudo add-apt-repository ppa:appimagelauncher-team/stable
sudo apt update
sudo apt install appimagelauncher
It should be running automatically. Now, open an appimage (directly, can't be from softlink), a window should popup asking if you want to integrate the appimage into your system. Press Integrate and run
. Now, you'll got a native version of your appimage, which can be searched and can be pinned on your dock.
If you don't want to use this app, you'll need to create a .desktop
file linking to your appimage.