Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
rb:apt-cheat-sheet [01/06/2018 00:19]
andrew [Force apt traffic through a proxy server]
rb:apt-cheat-sheet [23/05/2020 22:54] (current)
andrew [GPG error: Verification problem]
Line 1: Line 1:
 ====== apt Cheatsheet ====== ====== apt Cheatsheet ======
  
 +[[rb:​unpackingdebfiles|Unpacking .deb files]]
 ===== Search for available packages ===== ===== Search for available packages =====
  
Line 142: Line 142:
 ===== Force apt traffic through a proxy server ===== ===== Force apt traffic through a proxy server =====
  
-This situation arose in AWS where there was a private subnet (10.130.200.0) which could not route out to the internet. The solution was to install a proxy on ''​inet05'' ​running squid. APT needs configuring to use this proxy, it is a line in ''/​etc/​apt/​apt.conf'':​-+This situation arose in AWS where there was a private subnet (10.100.250.0) which could not route out to the internet. The solution was to install a proxy running squid. APT needs configuring to use this proxy, it is a line in ''/​etc/​apt/​apt.conf'':​-
  
 <​code>​ <​code>​
Line 157: Line 157:
 </​code>​ </​code>​
  
 +
 +===== Apt-Pinning the packages =====
 +
 +
 +In some cases you might need to “pin” the selected packages to avoid the upgrades from the distribution repositories. You’ll need to make a new file /​etc/​apt/​preferences.d/​00ServiceName.pref and add the following lines in it, for example:-
 +
 +  Package: *
 +  Pin: release o=Percona Development Team
 +  Pin-Priority:​ 1001
 +
 +For more information about the pinning you can check the official [[http://​wiki.debian.org/​AptPreferences|debian wiki]].
  
  
Line 180: Line 191:
  
  
 +
 +===== Force Remove packages =====
 + 
 +To remove a package causing an unworkable dependency ​ loop, use this, but beware it may break your system. ''​-r''​ removes a package, ''​-P''​ purges any left over config files too, they are mutually exclusive:-
 +
 +<​code>​
 +[root@server ~]# dpkg -r --force-depends <​package_name>​
 +
 +[root@server ~]# dpkg -P --force-depends <​package_name>​
 +</​code>​
  
  

rb/apt-cheat-sheet.1527812379.txt.gz · Last modified: 01/06/2018 00:19 by andrew