stow/dot-local/share/doc/stow/manual-split/Deleting-Packages.html

127 lines
5.9 KiB
HTML

<!DOCTYPE html>
<html>
<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- This manual describes GNU Stow version 2.3.2-fixbug56727
(2 November 2023), a program for managing farms of symbolic links.
Software and documentation is copyrighted by the following:
© 1993, 1994, 1995, 1996 Bob Glickstein <bobg+stow@zanshin.com>
© 2000, 2001 Guillaume Morin <gmorin@gnu.org>
© 2007 Kahlil (Kal) Hodgson <kahlil@internode.on.net>
© 2011 Adam Spiers <stow@adamspiers.org>
Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
preserved on all copies.
Permission is granted to copy and distribute modified versions of this
manual under the conditions for verbatim copying, provided also that the
section entitled "GNU General Public License" is included with the
modified manual, and provided that the entire resulting derived work is
distributed under the terms of a permission notice identical to this
one.
Permission is granted to copy and distribute translations of this manual
into another language, under the above conditions for modified versions,
except that this permission notice may be stated in a translation
approved by the Free Software Foundation. -->
<title>Deleting Packages (Stow)</title>
<meta name="description" content="Deleting Packages (Stow)">
<meta name="keywords" content="Deleting Packages (Stow)">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link href="index.html" rel="start" title="Top">
<link href="Index.html" rel="index" title="Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="index.html" rel="up" title="Top">
<link href="Conflicts.html" rel="next" title="Conflicts">
<link href="Installing-Packages.html" rel="prev" title="Installing Packages">
<style type="text/css">
<!--
a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
span:hover a.copiable-link {visibility: visible}
-->
</style>
</head>
<body lang="en">
<div class="chapter-level-extent" id="Deleting-Packages">
<div class="nav-panel">
<p>
Next: <a href="Conflicts.html" accesskey="n" rel="next">Conflicts</a>, Previous: <a href="Installing-Packages.html" accesskey="p" rel="prev">Installing Packages</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Index.html" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<h2 class="chapter" id="Deleting-Packages-1"><span>6 Deleting Packages<a class="copiable-link" href="#Deleting-Packages-1"> &para;</a></span></h2>
<a class="index-entry-id" id="index-deletion"></a>
<p>When the <samp class="option">-D</samp> option is given, the action of Stow is to
delete a package from the target tree. Note that Stow will not
delete anything it doesn&rsquo;t &ldquo;own&rdquo;. Deleting a package does <em class="emph">not</em>
mean removing it from the stow directory or discarding the package
tree.
</p>
<p>To delete a package, Stow recursively scans the target tree, skipping over any
directory that is not included in the installation image.<a class="footnote" id="DOCF7" href="#FOOT7"><sup>7</sup></a>
For example, if the target directory is <samp class="file">/usr/local</samp> and the
installation image for the package being deleted has only a <samp class="file">bin</samp>
directory and a <samp class="file">man</samp> directory at the top level, then we only scan
<samp class="file">/usr/local/bin</samp> and <samp class="file">/usr/local/man</samp>, and not
<samp class="file">/usr/local/lib</samp> or <samp class="file">/usr/local/share</samp>, or for that matter
<samp class="file">/usr/local/stow</samp>. Any symlink it finds that points into the package
being deleted is removed. Any directory that contained only symlinks to the
package being deleted is removed.
</p>
<a class="anchor" id="tree-refolding"></a><ul class="mini-toc">
<li><a href="#Refolding-_0060_0060foldable_0027_0027-trees_002e" accesskey="1">Refolding &ldquo;foldable&rdquo; trees.</a></li>
</ul>
<div class="section-level-extent" id="Refolding-_0060_0060foldable_0027_0027-trees_002e">
<h3 class="section"><span>6.1 Refolding &ldquo;foldable&rdquo; trees.<a class="copiable-link" href="#Refolding-_0060_0060foldable_0027_0027-trees_002e"> &para;</a></span></h3>
<a class="index-entry-id" id="index-refolding-trees"></a>
<a class="index-entry-id" id="index-tree-refolding"></a>
<p>After removing symlinks and empty subdirectories, any directory that
contains only symlinks to a single other package is considered to be a
previously &ldquo;folded&rdquo; tree that was &ldquo;split open.&rdquo; Stow will refold
the tree by removing the symlinks to the surviving package, removing
the directory, then linking the directory back to the surviving
package. However, this behaviour can be prevented via the
<samp class="option">--no-folding</samp> option; see <a class="pxref" href="Invoking-Stow.html">Invoking Stow</a>.
</p>
</div>
</div>
<div class="footnotes-segment">
<hr>
<h4 class="footnotes-heading">Footnotes</h4>
<h5 class="footnote-body-heading"><a id="FOOT7" href="#DOCF7">(7)</a></h5>
<p>This
approach was introduced in version 2 of GNU Stow. Previously, the whole
target tree was scanned and stow directories were explicitly omitted. This
became problematic when dealing with very large installations. The only
situation where this is useful is if you accidentally delete a directory in
the package tree, leaving you with a whole bunch of dangling links. Note that
you can enable the old approach with the <samp class="option">-p</samp> option. Alternatively, you can
use the <samp class="option">--badlinks</samp> option get stow to search for dangling links in your target tree and remove the offenders manually.</p>
</div>
</body>
</html>