[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

debian-faq: Patch4 to change apt-get / apt-cache into apt



Hello,

now the fourth patch, which documents the new apt command, as an
alternative for apt-get / apt-cache.

My approach is, to list both variants in examples, means the old
apt-get command, and the new apt command.

I added a sentence which gives a declaration about the new apt binary.

Additionally, I made apt/apt-get the recommended package tool over
aptitude. (Before it was the other way around.)


Comments welcome.


Holger


-- 
============================================================
Created with Sylpheed 3.5.0 under
	D E B I A N   L I N U X   8 . 0   " J E S S I E " .

Registered Linux User #311290 - https://linuxcounter.net/
============================================================
Index: choosing.sgml
===================================================================
--- choosing.sgml	(Revision 11106)
+++ choosing.sgml	(Arbeitskopie)
@@ -336,7 +336,7 @@
 system running mixed distributions.
 
 <p>It might be best in some situations to just fully upgrade to the new
-distribution running <prgn>apt-get dist-upgrade</prgn>, <prgn>aptitude
+distribution running <prgn>apt full-upgrade</prgn>, <prgn>aptitude
 safe-upgrade</prgn> or <prgn>aptitude full-upgrade</prgn>. Read
 apt's and aptitude's manual pages for more information.
 
Index: pkgtools.sgml
===================================================================
--- pkgtools.sgml	(Revision 11106)
+++ pkgtools.sgml	(Arbeitskopie)
@@ -72,6 +72,17 @@
 <tt>/usr/share/doc/apt-doc/guide.html/index.html</tt> (you will have to install
 the <tt>apt-doc</tt> package).
 
+<p>Please note that starting with Debian Jessie, the most popular
+<prgn/apt-get/ and <prgn/apt-cache/ commands got an equivalent via
+the new <prgn/apt/ binary. So some frequently used commands like
+<prgn/apt-get update/, <prgn/apt-get upgrade/, <prgn/apt-get install/,
+<prgn/apt-get remove/, <prgn/apt-cache search/, or <prgn/apt-cache show/
+now can also be called simply via <prgn/apt/, say <prgn/apt update/,
+<prgn/apt upgrade/, <prgn/apt install/, <prgn/apt remove/, <prgn/apt search/,
+or <prgn/apt show/ respective. To reflect this, we have listed both
+variants (the <prgn/apt-get/ and the <prgn/apt/ command) in the
+examples below.
+
 <p><prgn/apt-get/ provides a simple way to
 retrieve and install packages from multiple sources using the command
 line.  Unlike <prgn/dpkg/, <prgn/apt-get/ does not understand .deb
@@ -90,29 +101,39 @@
 <list>
        <item>To update the list of package known by your system, you can run:
                <example>apt-get update</example>
+               or <example>apt update</example>
        (you should execute this regularly to update your package lists)
 
        <item>To install the <var/foo/ package and all its dependencies, run:
                <example>apt-get install foo</example>
+               or <example>apt install foo</example>
 
        <item>To remove the foo package from your system, run:
                <example>apt-get remove foo</example>
+               or <example>apt remove foo</example>
 
        <item>To remove the foo package and its configuration files from your
              system, run:
                <example>apt-get purge foo</example>
+               or <example>apt purge foo</example>
 
+       <item>To list all packages, for which newer package versions are
+             available, run:
+               <example>apt list --upgradable</example>
+
        <item>To upgrade all the packages on your system (without installing
              extra packages or removing packages), run:
                <example>apt-get upgrade</example>
+               or <example>apt upgrade</example>
 
        <item>To upgrade all the packages on your system, and, if needed for a
              package upgrade, installing extra packages or removing packages, run:
                <example>apt-get dist-upgrade</example>
+               or <example>apt full-upgrade</example>
              (The command <tt>upgrade</tt> keeps a package at its installed
              obsolete version if upgrading would need an extra package to be
              installed, for a new dependency to be satisfied. The
-             <tt>dist-upgrade</tt> command is less conservative.)
+             <tt>dist-upgrade</tt>/<tt>full-upgrade</tt> command is less conservative.)
 
 </list>
 
@@ -132,9 +153,11 @@
 <list>
        <item>To find packages whose description contain <var/word/:
                <example>apt-cache search <var>word</var></example>
+               or <example>apt search <var>word</var></example>
 
        <item>To print the detailed information of a package:
                <example>apt-cache show <var>package</var></example>
+               or <example>apt show <var>package</var></example>
 
        <item>To print the packages a given package depends on:
                <example>apt-cache depends <var>package</var></example>
@@ -148,6 +171,7 @@
 
 
 <p>For more information, install the <package/apt/ package and read
+<manref name="apt" section="8">,
 <manref name="apt-get" section="8">, <manref name="sources.list" section="5">
 and install the  <package/apt-doc/ package and read
 <file>/usr/share/doc/apt-doc/guide.html/index.html</file>.
Index: uptodate.sgml
===================================================================
--- uptodate.sgml	(Revision 11106)
+++ uptodate.sgml	(Arbeitskopie)
@@ -31,12 +31,15 @@
 To deal with this avalanche, many people prefer to use a more automated
 method.  Several different packages are available for this purpose:
 
-<sect1 id="aptitude-upgrade">aptitude
+<sect1 id="apt-upgrade">apt-get and apt-cdrom
 
-<p><prgn/aptitude/ is the recommended package manager for &debian; systems, and
-is described in <ref id="aptitude">.
+<p><prgn/apt-get/ is the recommended package manager for &debian; systems, which is an
+APT-based command-line tool (described previously in <ref id="apt-get">).
 
-<p>Before you can use <prgn/aptitude/ to make an upgrade, you'll have to edit the
+<p><prgn/apt-get/, the APT-based command-line tool for handling packages,
+provides a simple, safe way to install and upgrade packages.
+
+<p>Before you can use <prgn/apt-get/ to make an upgrade, you'll have to edit the
 <tt>/etc/apt/sources.list</tt> file to set it up.  If you wish to upgrade to
 the latest stable version of Debian, you'll probably want to use a source like
 this one:
@@ -44,12 +47,41 @@
 <example>http://ftp.us.debian.org/debian stable main contrib non-free</example>
 
 <p>You can replace ftp.us.debian.org (the mirror in the United States) with the
-name of a faster Debian mirror near you. See the mirror list at
+name of a faster Debian mirror near by you. See the mirror list at
 <url id="http://www.debian.org/mirror/list";> for more information.
 
 <p>More details on this can be found in the <manref name="sources.list"
 section="5"> manual page.
 
+<p>Then run
+      <example>apt-get update</example>
+      resp. <example>apt update</example>
+followed by
+      <example>apt-get dist-upgrade</example>
+      resp. <example>apt full-upgrade</example>
+Answer any questions that might come up, and your system will be upgraded.
+See also the <manref name="apt-get" section="8"> manual page, as well
+as <ref id="apt-get">.
+
+<p>If you want to use CDs/DVDs/BDs to install packages, you can use <prgn/apt-cdrom/.
+For details, please see the Release Notes, section "Adding APT sources from
+optical media".
+
+<p>Please note that when you get and install the packages, you'll still have
+them kept in your /var directory hierarchy. To keep your partition from
+overflowing, remember to delete extra files using <tt>apt-get clean</tt> and
+<tt>apt-get autoclean</tt>, or to move them someplace else (hint: use
+<package/apt-move/).
+
+<sect1 id="aptitude-upgrade">aptitude
+
+<p>An alternative to <prgn/apt-get/ is <prgn/aptitude/ which
+is described in <ref id="aptitude">.
+
+<p>To use <prgn/aptitude/, edit the
+<tt>/etc/apt/sources.list</tt> file to set it up, just as for <ref
+id="apt-upgrade">.
+
 <p>To update your system in command line, run
       <example>aptitude update</example>
 followed by
@@ -68,36 +100,6 @@
 <p>For details, see the manual page <manref name="aptitude" section="8">,
 and the file <file>/usr/share/aptitude/README</file>.
 
-<sect1 id="apt">apt-get and apt-cdrom
-
-<p>An alternative to <prgn/aptitude/ is <prgn/apt-get/ which is an
-APT-based command-line tool (described previously in <ref id="apt-get">).
-
-<p><prgn/apt-get/, the APT-based command-line tool for handling packages,
-provides a simple, safe way to install and upgrade packages.
-
-<p>To use <prgn/apt-get/, edit the
-<tt>/etc/apt/sources.list</tt> file to set it up, just as for <ref
-id="aptitude-upgrade">.
-
-<p>Then run
-      <example>apt-get update</example>
-followed by
-      <example>apt-get dist-upgrade</example>
-Answer any questions that might come up, and your system will be upgraded.
-See also the <manref name="apt-get" section="8"> manual page, as well
-as <ref id="apt-get">.
-
-<p>If you want to use CDs/DVDs/BDs to install packages, you can use <prgn/apt-cdrom/.
-For details, please see the Release Notes, section "Adding APT sources from
-optical media".
-
-<p>Please note that when you get and install the packages, you'll still have
-them kept in your /var directory hierarchy. To keep your partition from
-overflowing, remember to delete extra files using <tt>apt-get clean</tt> and
-<tt>apt-get autoclean</tt>, or to move them someplace else (hint: use
-<package/apt-move/).
-
 <sect1 id="mirror">mirror
 
 <p>This Perl script, and its (optional) manager program called

Reply to: