Difference between revisions of "Linux comand: apt-get"
Jump to navigation
Jump to search
Rafahsolis (talk | contribs) Tag: visualeditor |
Rafahsolis (talk | contribs) m (→Update apt key) Tag: visualeditor |
||
| (One intermediate revision by the same user not shown) | |||
| Line 15: | Line 15: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
apt-cache madison gitlab-ce | apt-cache madison gitlab-ce | ||
| + | apt-cache policy gitlab-ce | ||
| + | </syntaxhighlight> | ||
| + | |||
| + | ==Install Specific version== | ||
| + | <br /><syntaxhighlight lang="bash"> | ||
| + | sudo apt-get install gitlab-ce=13.0.0-ce.0 | ||
</syntaxhighlight><br /> | </syntaxhighlight><br /> | ||
| − | |||
==Sources file path== | ==Sources file path== | ||
/etc/sources.list lista de repositorios de paquetes | /etc/sources.list lista de repositorios de paquetes | ||
| Line 42: | Line 47: | ||
sudo apt-key adv --keyserver hkp://keys.gnupg.net --recv-keys ED444FF07D8D0BF6 | sudo apt-key adv --keyserver hkp://keys.gnupg.net --recv-keys ED444FF07D8D0BF6 | ||
| − | Update all expired oneline | + | Update all expired oneline<syntaxhighlight lang="bash"> |
| − | + | for K in $(apt-key list | grep expired | cut -d'/' -f2 | cut -d' ' -f1); do sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com $K; done | |
| + | |||
| + | # for K in $(apt-key list | grep expired | cut -d'/' -f2 | cut -d' ' -f1); do sudo apt-key adv --recv-keys --keyserver keys.gnupg.net $K; done | ||
| + | </syntaxhighlight> | ||
==Using backports== | ==Using backports== | ||
Latest revision as of 15:34, 27 June 2022
- apt-get is deprecated use apt
System update
sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade
Package instalation
sudo apt-get install package-name
Search package
sudo apt-cache search qbasic
apt-get (update/install/purge package
apt-cache search
View Package versions
apt-cache madison gitlab-ce
apt-cache policy gitlab-ce
Install Specific version
sudo apt-get install gitlab-ce=13.0.0-ce.0
Sources file path
/etc/sources.list lista de repositorios de paquetes
apt-key
Remove expired key
apt-key list apt-key del <expired key>
Export keys
apt-key exportall > trusted-keys apt-key export 90E9F83F22250DD7 > parsoid.key
Import key
sudo apt-key add parsoid.key
Retrive missing keys
To retrieve key ED444FF07D8D0BF6
gpg --keyserver pgpkeys.mit.edu --recv-key ED444FF07D8D0BF6 gpg -a --export ED444FF07D8D0BF6 | sudo apt-key add -
To use a proxy: sudo apt-key adv --keyserver keyserver.ubuntu.com --keyserver-options http-proxy=http://localhost:3128 --recv-keys BBEBDCB318AD50EC6865090613B00F1FD2C19886
Update apt key
(solve apt KEYEXPIRED)
sudo apt-key adv --keyserver hkp://keys.gnupg.net --recv-keys ED444FF07D8D0BF6
Update all expired oneline
for K in $(apt-key list | grep expired | cut -d'/' -f2 | cut -d' ' -f1); do sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com $K; done
# for K in $(apt-key list | grep expired | cut -d'/' -f2 | cut -d' ' -f1); do sudo apt-key adv --recv-keys --keyserver keys.gnupg.net $K; done
Using backports
cat /etc/apt/sources.list.d/backports.list
deb http://ftp.debian.org/debian jessie-backports main sudo apt-get install python-certbot-apache -t jessie-backports
Fix apt-get gone wrong
sudo apt-get autoremove sudo apt-get --purge remove && sudo apt-get autoclean sudo apt-get -f install sudo apt-get update sudo apt-get upgrade && sudo apt-get dist-upgrade sudo dpkg --configure -a
apt proxy configuration
/etc/apt/apt.conf.d/25proxy
Acquire {
HTTP::proxy "http://username:password@proxy.example.com:8080";
HTTPS::proxy "http://username:password@proxy.example.com:8080";
}