<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Cosmic-leaf</id>
	<title>Alpine Linux - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.alpinelinux.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Cosmic-leaf"/>
	<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/wiki/Special:Contributions/Cosmic-leaf"/>
	<updated>2026-05-05T21:00:57Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Linux_iSCSI_Target_(TCM)&amp;diff=9168</id>
		<title>Linux iSCSI Target (TCM)</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Linux_iSCSI_Target_(TCM)&amp;diff=9168"/>
		<updated>2013-08-04T16:57:37Z</updated>

		<summary type="html">&lt;p&gt;Cosmic-leaf: Removed obsolete information.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Since kernel 2.6.38 Linux has a new generic Target Core module, merged from LIO [[http://linux-iscsi.org/wiki/Main_Page]], and since 3.1 there is iSCSI support. This how-to quickly explains how to use it.&lt;br /&gt;
&lt;br /&gt;
Install the utilities to configure Target Core:&lt;br /&gt;
&lt;br /&gt;
  # apk add targetcli&lt;br /&gt;
  # rc-update add targetcli&lt;br /&gt;
  # /etc/init.d/targetcli start&lt;br /&gt;
&lt;br /&gt;
In contrast with plain text files as usual, all configuration is done in ConfigFS via targetcli shell (you can use tab for command auto-completion and &amp;quot;ls&amp;quot; for inspecting current config):&lt;br /&gt;
&lt;br /&gt;
  # targetcli&lt;br /&gt;
  Welcome to the targetcli shell::&lt;br /&gt;
  Copyright (c) 2011 by RisingTide Systems LLC.&lt;br /&gt;
&lt;br /&gt;
  For help on commands, type &#039;help&#039;.&lt;br /&gt;
&lt;br /&gt;
  /&amp;gt; ls&lt;br /&gt;
  o- / ..................................................................... [...]&lt;br /&gt;
  o- backstores .......................................................... [...]&lt;br /&gt;
  | o- fileio ............................................... [0 Storage Object]&lt;br /&gt;
  | o- iblock ............................................... [0 Storage Object]&lt;br /&gt;
  | o- pscsi ................................................ [0 Storage Object]&lt;br /&gt;
  | o- rd_dr ................................................ [0 Storage Object]&lt;br /&gt;
  | o- rd_mcp ............................................... [0 Storage Object]&lt;br /&gt;
  o- ib_srpt ........................................................ [0 Target]&lt;br /&gt;
  o- iscsi .......................................................... [0 Target]&lt;br /&gt;
  o- loopback ....................................................... [0 Target]&lt;br /&gt;
  o- qla2xxx ........................................................ [0 Target]&lt;br /&gt;
  /&amp;gt; &lt;br /&gt;
&lt;br /&gt;
You can create a file to be exported as a target:&lt;br /&gt;
&lt;br /&gt;
  /&amp;gt; cd backstores/fileio&lt;br /&gt;
  /backstores/fileio&amp;gt; create file_backstore file1 1M&lt;br /&gt;
  Generating a wwn serial.&lt;br /&gt;
  Not using buffered mode.&lt;br /&gt;
  Created fileio file_backstore.&lt;br /&gt;
  /backstores/fileio&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Or you can use a block device:&lt;br /&gt;
&lt;br /&gt;
  /&amp;gt; cd backstores/blockio&lt;br /&gt;
  /backstores/blockio&amp;gt; create block0 /dev/sda1&lt;br /&gt;
&lt;br /&gt;
You can use any block device, including RAID and LVM2. Now create an iSCSI Target and a Target Portal Group (tpg) (the iqn is automatically created. You can also specify one by hand):&lt;br /&gt;
&lt;br /&gt;
  /&amp;gt; cd /iscsi&lt;br /&gt;
  /iscsi&amp;gt; create&lt;br /&gt;
  Created target iqn.2003-01.org.linux-iscsi.rtsnode1.x8664:sn.83a8cde7aca8.&lt;br /&gt;
  Selected TPG Tag 1.&lt;br /&gt;
  Successfully created TPG 1.&lt;br /&gt;
&lt;br /&gt;
Now you have to tell Target Core to use the previously create backstore for the target now created:&lt;br /&gt;
&lt;br /&gt;
  ../tpg1&amp;gt; cd luns&lt;br /&gt;
  ../tpg1/luns&amp;gt; create lun=0 storage_object=/backstores/blockio/block0&lt;br /&gt;
  Successfully created LUN 0.&lt;br /&gt;
&lt;br /&gt;
Now create the iSCSI portal:&lt;br /&gt;
&lt;br /&gt;
  ../tpg1/luns&amp;gt; cd ../portals&lt;br /&gt;
  ../tpg1/portals&amp;gt; create ip_address=192.168.1.10&lt;br /&gt;
  Using default IP port 3260&lt;br /&gt;
  Successfully created network portal 192.168.1.10:3260.&lt;br /&gt;
&lt;br /&gt;
By default authentication is enabled. To disable it:&lt;br /&gt;
&lt;br /&gt;
  ../tpg1&amp;gt; set attribute authentication=0&lt;br /&gt;
  Parameter authentication is now &#039;0&#039;.&lt;br /&gt;
  ../tpg1&amp;gt; set attribute generate_node_acls=1&lt;br /&gt;
  Parameter generate_node_acls is now &#039;1&#039;.&lt;br /&gt;
&lt;br /&gt;
Finally save the configuration:&lt;br /&gt;
&lt;br /&gt;
  /&amp;gt; saveconfig&lt;br /&gt;
  Existing file /etc/target/saveconfig.json backed up to saveconfig.json.backup&lt;br /&gt;
  Configuration saved to /etc/target/saveconfig.json&lt;br /&gt;
&lt;br /&gt;
For real use, you should always track changes to the saveconfig file and make sure &lt;br /&gt;
(there&#039;s a flag for it) to not save config if you are in an error situation. By default, &lt;br /&gt;
targetcli creates a config backup if you exit, meaning you might lose the working&lt;br /&gt;
config at the time. So better to be prepared.&lt;br /&gt;
Errors don&#039;t simply appear, but i.e. if you&#039;re missing a HBA on boot, these settings&lt;br /&gt;
will not be loaded and thus not be in the configuration upon save.&lt;br /&gt;
&lt;br /&gt;
[[Category:Storage]]&lt;/div&gt;</summary>
		<author><name>Cosmic-leaf</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Include:Upgrading_to_Edge&amp;diff=9167</id>
		<title>Include:Upgrading to Edge</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Include:Upgrading_to_Edge&amp;diff=9167"/>
		<updated>2013-08-04T16:53:50Z</updated>

		<summary type="html">&lt;p&gt;Cosmic-leaf: Bumped version up to 2.6&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;An upgrade of Alpine Linux from a stable version to the rolling development version, &#039;&#039;edge&#039;&#039; can be done in a few simple steps. (These instructions assume that Alpine Linux is installed to a hard drive, rather than run-from-RAM.)&lt;br /&gt;
&lt;br /&gt;
To begin, you need to update your {{Path|/etc/apk/repositories}} file. Here are some shortcuts for doing so:&lt;br /&gt;
:* Launch {{Cmd|setup-apkrepos}} Enter {{Key|e}} to edit {{Path|/etc/apk/repositories}}. Change the version number (such as &amp;lt;var&amp;gt;v2.6&amp;lt;/var&amp;gt;) to &#039;&#039;&#039;edge&#039;&#039;&#039;.&lt;br /&gt;
:* Or, edit the file in place: {{Cmd|sed -i -e &#039;s/&amp;lt;var&amp;gt;v2\.6&amp;lt;/var&amp;gt;/&amp;lt;var&amp;gt;edge&amp;lt;/var&amp;gt;/g&#039; /etc/apk/repositories}}&lt;br /&gt;
  &amp;lt;!-- &lt;br /&gt;
  cat /etc/alpine-release | cut -c 0-3&lt;br /&gt;
  This is not working at the moment&lt;br /&gt;
  cat /etc/alpine-release | cut -c 0-3 | sed -i -e &#039;s/v{}/edge/g&#039; /etc/apk/repositories&lt;br /&gt;
  --&amp;gt;&lt;br /&gt;
The result should look like this:&lt;br /&gt;
{{Cat|/etc/apk/repositories|...&lt;br /&gt;
http://dl-3.alpinelinux.org/alpine/edge/main}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
After updating the repositories file, obtain the latest index (and available packages, if you&#039;ve [[Local APK cache|enabled APK caching]]):&lt;br /&gt;
{{Cmd|apk update --update-cache}}&lt;br /&gt;
&lt;br /&gt;
Next, ensure you have the latest available version of the Alpine Linux Package Manager first before upgrading anything else:&lt;br /&gt;
{{Cmd|apk add --upgrade apk-tools}}&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, upgrade all your packages in one shot: {{Cmd|apk upgrade --update-cache --available}}&lt;br /&gt;
The &amp;lt;code&amp;gt;--available&amp;lt;/code&amp;gt; switch is used to force all packages to be upgraded, even if they have the same version numbers. Sometimes changes in uClibc have required doing this.&lt;br /&gt;
&lt;br /&gt;
{{Note|You will need to restart any services that have been upgraded to begin using the upgraded versions. If the kernel is upgraded, you will need to reboot to begin using the upgraded version:&lt;br /&gt;
{{Cmd|sync&lt;br /&gt;
reboot}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
To check your current release: {{Cmd|cat /etc/alpine-release}} You will see the build date attached to the release.&lt;br /&gt;
&lt;br /&gt;
[[Category:Package Manager]]&lt;br /&gt;
[[Category:Installation]]&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Cosmic-leaf</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Include:Using_Internet_Repositories_for_apk-tools&amp;diff=9166</id>
		<title>Include:Using Internet Repositories for apk-tools</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Include:Using_Internet_Repositories_for_apk-tools&amp;diff=9166"/>
		<updated>2013-08-04T16:52:57Z</updated>

		<summary type="html">&lt;p&gt;Cosmic-leaf: Bumped version up to 2.6&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Edit the {{Path|/etc/apk/repositories}} file and if necessary, add references to the Alpine package repositories. In the example below, the reference to the Alpine CD is maintained, so that if the requested package is available on the local media, it will be obtained from there instead of being downloaded from the remote repository:&lt;br /&gt;
&lt;br /&gt;
{{Cat|/etc/apk/repositories|/media/cdrom/apks&lt;br /&gt;
http://dl-3.alpinelinux.org/alpine/v2.6/main}}&lt;br /&gt;
&lt;br /&gt;
Only one repository is shown above; however, you may also replace &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;http://dl-3.alpinelinux.org/alpine/&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; with any of these (if you wish to use another version, also replace &amp;lt;code&amp;gt;v2.6&amp;lt;/code&amp;gt; with the desired version):&lt;br /&gt;
{{Mirrors}}&lt;br /&gt;
&lt;br /&gt;
After updating the repositories file, obtain the latest index of available packages:&lt;br /&gt;
{{Cmd|apk update}}&lt;br /&gt;
&lt;br /&gt;
{{Tip|Adding the &amp;lt;code&amp;gt;-U&amp;lt;/code&amp;gt;/&amp;lt;code&amp;gt;--update-cache&amp;lt;/code&amp;gt; to another apk command, as in &amp;lt;code&amp;gt;apk add -U ...&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;apk upgrade -U&amp;lt;/code&amp;gt;, has the same effect as running &amp;lt;code&amp;gt;apk update&amp;lt;/code&amp;gt; before the other apk command.}}&lt;/div&gt;</summary>
		<author><name>Cosmic-leaf</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Include:Upgrading_to_latest_release&amp;diff=9165</id>
		<title>Include:Upgrading to latest release</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Include:Upgrading_to_latest_release&amp;diff=9165"/>
		<updated>2013-08-04T16:52:35Z</updated>

		<summary type="html">&lt;p&gt;Cosmic-leaf: Bumped version up to 2.6&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;When Alpine Linux is installed to hard drive, upgrading to a newer stable version is straightforward.&lt;br /&gt;
&lt;br /&gt;
To begin, you need to update your {{Path|/etc/apk/repositories}} file. Here are some shortcuts for doing so:&lt;br /&gt;
:* Launch {{Cmd|setup-apkrepos}} Enter {{Key|e}} to edit {{Path|/etc/apk/repositories}}. Change the version number by hand.&lt;br /&gt;
:* Or, edit the file in place. This is how you&#039;d change &amp;lt;var&amp;gt;v2.5&amp;lt;/var&amp;gt; to &amp;lt;var&amp;gt;v2.6&amp;lt;/var&amp;gt;: {{Cmd|sed -i -e &#039;s/&amp;lt;var&amp;gt;v2\.5&amp;lt;/var&amp;gt;/&amp;lt;var&amp;gt;v2.6&amp;lt;/var&amp;gt;/g&#039; /etc/apk/repositories}}&lt;br /&gt;
&lt;br /&gt;
Or you could do this manually: {{:Include:Using_Internet_Repositories_for_apk-tools}}&lt;br /&gt;
&lt;br /&gt;
If you&#039;re upgrading from a version of Alpine before 2.3.0_rc1, ensure you have the latest available version of the Alpine Linux Package Manager first before upgrading anything else:&lt;br /&gt;
{{Cmd|apk add --upgrade apk-tools}}&lt;br /&gt;
&lt;br /&gt;
Next, upgrade all your packages: {{Cmd|apk upgrade --available}}&lt;br /&gt;
The &amp;lt;code&amp;gt;--available&amp;lt;/code&amp;gt; switch is used to force all packages to be upgraded, even if they have the same version numbers. Sometimes changes in uClibc require doing this.&lt;br /&gt;
&lt;br /&gt;
{{Note|You will need to restart any services that have been upgraded to begin using the upgraded versions. If the kernel is upgraded, you will need to reboot to begin using the upgraded version:&lt;br /&gt;
{{Cmd|sync&lt;br /&gt;
reboot}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Package Manager]]&lt;br /&gt;
[[Category:Installation]]&lt;/div&gt;</summary>
		<author><name>Cosmic-leaf</name></author>
	</entry>
	<entry>
		<id>https://wiki.alpinelinux.org/w/index.php?title=Alpine_Package_Keeper&amp;diff=9164</id>
		<title>Alpine Package Keeper</title>
		<link rel="alternate" type="text/html" href="https://wiki.alpinelinux.org/w/index.php?title=Alpine_Package_Keeper&amp;diff=9164"/>
		<updated>2013-08-04T16:48:29Z</updated>

		<summary type="html">&lt;p&gt;Cosmic-leaf: Bumped version numbers up to 2.6&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--For searching: apk, APK--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Because Alpine Linux is designed to run from RAM, package management involves two phases:&lt;br /&gt;
* Installing / Upgrading / Deleting packages on a running system&lt;br /&gt;
* Restoring a system to a previously configured state (e.g. after reboot), including all previously installed packages and locally modified configuration files. &#039;&#039;&#039;(RAM-Based Installs Only)&#039;&#039;&#039;&lt;br /&gt;
&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;apk&#039;&#039;&#039; is the tool used to install, upgrade, or delete software on a running sytem.&amp;lt;br /&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;lbu&#039;&#039;&#039; is the tool used to capture the data necessary to restore a system to a previously configured state.&lt;br /&gt;
&lt;br /&gt;
This page documents the [http://git.alpinelinux.org/cgit/apk-tools.git apk tool] - See the [[Alpine_local_backup|Alpine Local Backup page]] for the lbu tool.&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;apk&#039;&#039;&#039; tool has the following applets:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
| [[#Add a Package|add]] &lt;br /&gt;
| Add new packages to the running system&lt;br /&gt;
|-&lt;br /&gt;
| [[#Remove a Package|del]]&lt;br /&gt;
| Delete packages from the running system&lt;br /&gt;
|-&lt;br /&gt;
| fix &lt;br /&gt;
| Attempt to repair or upgrade an installed package &lt;br /&gt;
|-&lt;br /&gt;
| [[#Update the Package list|update]] &lt;br /&gt;
| Update the index of available packages&lt;br /&gt;
|-&lt;br /&gt;
| [[#Info on Packages|info]]&lt;br /&gt;
| Prints information about installed or available packages&lt;br /&gt;
|-&lt;br /&gt;
| [[#Search for Packages|search]] &lt;br /&gt;
| Search for packages or descriptions with wildcard patterns&lt;br /&gt;
|-&lt;br /&gt;
| [[#Upgrade a Running System|upgrade]]&lt;br /&gt;
| Upgrade the currently installed packages&lt;br /&gt;
|-&lt;br /&gt;
| [[#Cache Maintenance|cache]]&lt;br /&gt;
| Maintenance operations for locally cached package repository&lt;br /&gt;
|-&lt;br /&gt;
| version &lt;br /&gt;
| Compare version differences between installed and available packages&lt;br /&gt;
|-&lt;br /&gt;
| index &lt;br /&gt;
| create a repository index from a list of packages&lt;br /&gt;
|-&lt;br /&gt;
| fetch &lt;br /&gt;
| download (but not install) packages&lt;br /&gt;
|-&lt;br /&gt;
| audit &lt;br /&gt;
| List changes to the file system from pristine package install state&lt;br /&gt;
|-&lt;br /&gt;
| verify &lt;br /&gt;
| Verify a package signature&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
= Packages and Repositories =&lt;br /&gt;
&lt;br /&gt;
Software packages for Alpine Linux are digitally signed tar.gz archives containing the programs, configuration files, and dependency metadata. They have the extension &amp;lt;code&amp;gt;.apk&amp;lt;/code&amp;gt;, and are often called &amp;quot;a-packs&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The packages are stored in one or more &#039;&#039;repositories&#039;&#039;. A repository is simply a directory with a collection of *.apk files.  The directory must include a special index file, named {{Path|APKINDEX.tar.gz}} to be considered a repository.&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;apk&#039;&#039;&#039; utility can install packages from multiple repositories.  The list of repositories to check is stored in {{Path|/etc/apk/repositories}}, one repository per line. If you booted from USB stick ({{Path|/media/sda1}}) or CD-ROM ({{Path|/media/cdrom}}), your repository file probably looks something like this:&lt;br /&gt;
&lt;br /&gt;
{{Cat|/etc/apk/repositories|/media/sda1/apks/}}&lt;br /&gt;
&lt;br /&gt;
In addition to local repositories, the &#039;&#039;&#039;apk&#039;&#039;&#039; utility uses &#039;&#039;&#039;busybox wget&#039;&#039;&#039; to fetch packages using &#039;&#039;http:&#039;&#039;, &#039;&#039;https:&#039;&#039; or &#039;&#039;ftp:&#039;&#039; protocols. The following is a valid repository file:&lt;br /&gt;
&lt;br /&gt;
{{Cat|/etc/apk/repositories|&lt;br /&gt;
/media/sda1/apks&lt;br /&gt;
http://dl-3.alpinelinux.org/alpine/v2.6/main&lt;br /&gt;
https://dl-3.alpinelinux.org/alpine/v2.6/main&lt;br /&gt;
ftp://dl-3.alpinelinux.org/alpine/v2.6/main&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Note|Currently there are no public https or ftp repositories. The protocols are available for local repositories.}}&lt;br /&gt;
&lt;br /&gt;
== Repository pinning ==&lt;br /&gt;
&lt;br /&gt;
You can specify additional &amp;quot;tagged&amp;quot; repositories in {{Path|/etc/apk/repositories}}:&lt;br /&gt;
&lt;br /&gt;
{{Cat|/etc/apk/repositories|&lt;br /&gt;
http://nl.alpinelinux.org/alpine/v2.6/main&lt;br /&gt;
@edge http://nl.alpinelinux.org/alpine/edge/main&lt;br /&gt;
@testing http://nl.alpinelinux.org/alpine/edge/testing&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
After which you can &amp;quot;pin&amp;quot; dependencies to these tags using:&lt;br /&gt;
&lt;br /&gt;
{{cmd|apk add stableapp newapp@edge bleedingapp@testing}}&lt;br /&gt;
&lt;br /&gt;
Apk will now by default only use the untagged repositories, but adding a tag to specific package:&lt;br /&gt;
&lt;br /&gt;
1. will prefer the repository with that tag for the named package, even if a later version of the package is available in another repository&lt;br /&gt;
&lt;br /&gt;
2. &#039;&#039;allows&#039;&#039; pulling in dependencies for the tagged package from the tagged repository (though it &#039;&#039;prefers&#039;&#039; to use untagged repositories to satisfy dependencies if possible)&lt;br /&gt;
&lt;br /&gt;
= Update the Package list =&lt;br /&gt;
&lt;br /&gt;
Remote repositories change as packages are added and upgraded.   To get the latest list of  available packages, use the &#039;&#039;update&#039;&#039; command.  The command downloads the {{Path|APKINDEX.tar.gz}} from each repository and stores it in the local cache, typically {{Path|/var/lib/apk/}} or {{Path|/etc/apk/cache/}}.&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk update}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
fetch http://dl-3.alpinelinux.org/alpine/v2.1/main/APKINDEX.tar.gz&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Tip|If using remote repositories, it is a good idea to do an &#039;&#039;&#039;update&#039;&#039;&#039; just before doing an &#039;&#039;&#039;add&#039;&#039;&#039; or &#039;&#039;&#039;upgrade&#039;&#039;&#039; command.  That way you know you are using the latest software available.}}&lt;br /&gt;
&lt;br /&gt;
= Add a Package =&lt;br /&gt;
&lt;br /&gt;
Use &#039;&#039;&#039;add&#039;&#039;&#039; to install packages from a repository.  Any necessary dependencies are also installed.  If you have multiple repositories, the &#039;&#039;&#039;add&#039;&#039;&#039; command installs the newest package.&lt;br /&gt;
&lt;br /&gt;
{{Cmd|apk add openssh&lt;br /&gt;
apk add openssh openntp vim}}&lt;br /&gt;
&lt;br /&gt;
If you only have the main repository enabled in your configuration, apk will not include packages from the other repositories. To install a package from the edge/testing repository without changing your repository configuration file, use the command below. This will tell apk to use that particular repository.&lt;br /&gt;
&lt;br /&gt;
{{cmd|apk add cherokee --update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ --allow-untrusted}}&lt;br /&gt;
&lt;br /&gt;
{{Note|Be careful when using third-party or the testing repository. Your system can go down.}}&lt;br /&gt;
&lt;br /&gt;
= Remove a Package  =&lt;br /&gt;
Use &#039;&#039;&#039;del&#039;&#039;&#039; to remove a package (and dependencies that are no longer needed.)  &lt;br /&gt;
&lt;br /&gt;
{{cmd|apk del openssh&lt;br /&gt;
apk del openssh openntp vim}}&lt;br /&gt;
&lt;br /&gt;
= Upgrade a Running System =&lt;br /&gt;
&lt;br /&gt;
To upgrade &#039;&#039;all&#039;&#039; the packages of a running system, use &#039;&#039;&#039;upgrade&#039;&#039;&#039;:&lt;br /&gt;
&lt;br /&gt;
{{cmd|apk update&lt;br /&gt;
apk upgrade&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
To upgrade &#039;&#039;only a few&#039;&#039; packages, use the &#039;&#039;&#039;add&#039;&#039;&#039; command with the &#039;&#039;-u&#039;&#039;/&#039;&#039;--upgrade&#039;&#039; option:&lt;br /&gt;
&lt;br /&gt;
{{cmd|apk update&lt;br /&gt;
apk add --upgrade busybox &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{Note|Remember that when you reboot your machine, the remote repository will not be available until after networking is started.   This means packages newer than your local boot media will likely not be installed after a reboot. To make an &amp;quot;upgrade&amp;quot; persist over a reboot, use a [[#Local Cache|local cache]].}}&lt;br /&gt;
&lt;br /&gt;
= Search for Packages =&lt;br /&gt;
The &#039;&#039;&#039;search&#039;&#039;&#039; command searches the repository Index files for installable packages. &lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
* To list all packages available, along with their descriptions: {{cmd|apk search -v}}&lt;br /&gt;
* To list all packages are part of the ACF system: {{cmd|apk search -v &#039;acf*&#039; }}&lt;br /&gt;
* To list all packages that list NTP as part of their description, use the &#039;&#039;-d&#039;&#039;/&#039;&#039;--description&#039;&#039; option: {{cmd|apk search -v --description &#039;NTP&#039; }}&lt;br /&gt;
&lt;br /&gt;
= Info on Packages =&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;&#039;info&#039;&#039;&#039; command provides information on the contents of packages, their dependencies, and which files belong to a package.&lt;br /&gt;
&lt;br /&gt;
For a given package, each element can be chosen (for example, &#039;&#039;-w&#039;&#039; to show just the webpage information); or all information is displayed with the &#039;&#039;-a&#039;&#039; command.&lt;br /&gt;
&lt;br /&gt;
Example: {{cmd|apk info -a zlib}}&lt;br /&gt;
&lt;br /&gt;
 &#039;&#039;&#039;zlib-1.2.5-r1 description:&#039;&#039;&#039;&lt;br /&gt;
 A compression/decompression Library&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;zlib-1.2.5-r1 webpage:&#039;&#039;&#039;&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;http://zlib.net&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;zlib-1.2.5-r1 installed size:&#039;&#039;&#039;&lt;br /&gt;
 94208&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;zlib-1.2.5-r1 depends on:&#039;&#039;&#039;&lt;br /&gt;
 libc0.9.32&lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;zlib-1.2.5-r1 is required by:&#039;&#039;&#039;&lt;br /&gt;
 libcrypto1.0-1.0.0-r0&lt;br /&gt;
 apk-tools-2.0.2-r4&lt;br /&gt;
 openssh-client-5.4_p1-r2&lt;br /&gt;
 openssh-5.4_p1-r2&lt;br /&gt;
 libssl1.0-1.0.0-r0&lt;br /&gt;
 freeswitch-1.0.6-r6&lt;br /&gt;
 atop-1.25-r0 &lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;zlib-1.2.5-r1 contains:&#039;&#039;&#039;&lt;br /&gt;
 lib/libz.so.1.2.5&lt;br /&gt;
 lib/libz.so.1&lt;br /&gt;
 lib/libz.so &lt;br /&gt;
 &lt;br /&gt;
 &#039;&#039;&#039;zlib-1.2.5-r1 triggers:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
As shown in the example you can determine&lt;br /&gt;
* The &#039;&#039;&#039;description&#039;&#039;&#039; of the package (&#039;&#039;-d&#039;&#039;/&#039;&#039;--description&#039;&#039;)&lt;br /&gt;
* The &#039;&#039;&#039;webpage&#039;&#039;&#039; where the application is hosted (&#039;&#039;-w&#039;&#039;/&#039;&#039;--webpage&#039;&#039;)&lt;br /&gt;
* The &#039;&#039;&#039;size&#039;&#039;&#039; the package will require once installed (in bytes) (&#039;&#039;-s&#039;&#039;/&#039;&#039;--size&#039;&#039;)&lt;br /&gt;
* What packages are required to use this one  (&#039;&#039;&#039;depends&#039;&#039;&#039;) (&#039;&#039;-R&#039;&#039;/&#039;&#039;--depends&#039;&#039;)&lt;br /&gt;
* What packages require this one to be installed (&#039;&#039;&#039;required by&#039;&#039;&#039;) (&#039;&#039;-r&#039;&#039;/&#039;&#039;--rdepends&#039;&#039;)&lt;br /&gt;
* The &#039;&#039;&#039;contents&#039;&#039;&#039; of the package, that is, which files it installs (&#039;&#039;-L&#039;&#039;/&#039;&#039;--contents&#039;&#039;)&lt;br /&gt;
* Any &#039;&#039;&#039;triggers&#039;&#039;&#039; this package sets. (&#039;&#039;-t&#039;&#039;/&#039;&#039;--triggers&#039;&#039;) Listed here are directories that are watched; if a change happens to the directory, then the trigger script is run at the end of the apk add/delete.   For example, doing a depmod once after installing all packages that add kernel modules.&lt;br /&gt;
&lt;br /&gt;
{{Tip|The &#039;&#039;&#039;info&#039;&#039;&#039; command is also useful to determine which package a file belongs to.  For example: {{cmd|apk info --who-owns /sbin/lbu}} will display&lt;br /&gt;
&lt;br /&gt;
 /sbin/lbu is owned by alpine-conf-x.x-rx&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
= Additional apk Commands =&lt;br /&gt;
In progress...&lt;br /&gt;
&lt;br /&gt;
= Local Cache =&lt;br /&gt;
&lt;br /&gt;
{{:Local_APK_cache}}&lt;br /&gt;
&lt;br /&gt;
= Advanced APK Usage =&lt;br /&gt;
&lt;br /&gt;
== Holding a specific package back ==&lt;br /&gt;
&lt;br /&gt;
In certain cases, you may want to upgrade a system, but keep a specific package at a back level.  It is possible to add &amp;quot;sticky&amp;quot; or versioned dependencies.  For instance, to hold the &#039;&#039;asterisk&#039;&#039; package to the 1.6.2 level or lower:&lt;br /&gt;
{{cmd|1=apk add asterisk=1.6.0.21-r0}}&lt;br /&gt;
or&lt;br /&gt;
{{cmd|apk add &#039;asterisk&amp;lt;1.6.1&#039;}}&lt;br /&gt;
&lt;br /&gt;
after which a {{cmd|apk upgrade}}&lt;br /&gt;
&lt;br /&gt;
will upgrade the entire system, keeping the asterisk package at the 1.6.0 or lower level&lt;br /&gt;
&lt;br /&gt;
To later upgrade to the current version,&lt;br /&gt;
&lt;br /&gt;
{{cmd|apk add &#039;asterisk&amp;gt;1.6.1&#039;}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Package Manager]]&lt;/div&gt;</summary>
		<author><name>Cosmic-leaf</name></author>
	</entry>
</feed>