How to use the command 'tlmgr pinning' (with examples)

How to use the command 'tlmgr pinning' (with examples)

The ’tlmgr pinning’ command is used to manage the pinning file in the TeX Live Manager (tlmgr). The pinning file allows users to specify particular package versions to be used from specific repositories.

Use case 1: Show the current pinning data

Code:

tlmgr pinning show

Motivation: By showing the current pinning data, users can check which packages are currently pinned to specific repositories. This information can help in understanding the package versioning being used in a TeX Live installation.

Explanation:

  • ’tlmgr’ is the command for TeX Live Manager.
  • ‘pinning’ is the subcommand for managing the pinning file.
  • ‘show’ is the action to display the current pinning data.

Example output:

Current pinning data:
Package1: repository1
Package2: repository2

Use case 2: Pin packages to a specific repository

Code:

tlmgr pinning add repository package1 package2 ...

Motivation: Pinning packages to a specific repository ensures that only the desired versions of those packages are installed. This is useful when certain packages may have compatibility issues with newer versions or when using legacy packages that are not frequently updated.

Explanation:

  • ’tlmgr’ is the command for TeX Live Manager.
  • ‘pinning’ is the subcommand for managing the pinning file.
  • ‘add’ is the action to pin packages to a repository.
  • ‘repository’ is the specified repository name.
  • ‘package1’, ‘package2’, etc. are the package names to be pinned.

Example:

tlmgr pinning add texlive.infra https://ftp.tug.org/texlive/tlnet/

Use case 3: Remove packages recorded in the pinning file

Code:

tlmgr pinning remove repository package1 package2 ...

Motivation: Removing packages recorded in the pinning file is useful when there is a need to update or change the pinned versions of certain packages. It allows for more flexibility in managing package dependencies and versions.

Explanation:

  • ’tlmgr’ is the command for TeX Live Manager.
  • ‘pinning’ is the subcommand for managing the pinning file.
  • ‘remove’ is the action to remove packages recorded in the pinning file for a specific repository.
  • ‘repository’ is the specified repository name.
  • ‘package1’, ‘package2’, etc. are the package names to be removed.

Example:

tlmgr pinning remove texlive.infra texlive.texmf-dist

Use case 4: Remove all pinning data for a specific repository

Code:

tlmgr pinning remove repository --all

Motivation: The ability to remove all pinning data for a specific repository is useful when there is a need to reset the pinning configuration or start fresh. This allows for a clean slate when managing package versions and repositories.

Explanation:

  • ’tlmgr’ is the command for TeX Live Manager.
  • ‘pinning’ is the subcommand for managing the pinning file.
  • ‘remove’ is the action to remove all pinning data for a specific repository.
  • ‘repository’ is the specified repository name.
  • ‘–all’ is an optional argument to remove all pinning data.

Example:

tlmgr pinning remove texlive.infra --all

Conclusion:

The ’tlmgr pinning’ command is a powerful tool for managing package versions and repositories in TeX Live Manager. By showing, adding, removing, and resetting pinning data, users can control the exact versions of packages used in their TeX Live installations.

Related Posts

Using bzegrep (with examples)

Using bzegrep (with examples)

1: Search for extended regular expressions in a compressed file (case-sensitive) The first use case of the bzegrep command is to search for extended regular expressions in a compressed file while considering the case sensitivity.

Read More
How to use the command `scala-cli` (with examples)

How to use the command `scala-cli` (with examples)

This article showcases various use cases of the scala-cli command, which is a tool for interacting with the Scala programming language.

Read More
How to use the command 'clip' (with examples)

How to use the command 'clip' (with examples)

The ‘clip’ command in Windows allows users to copy input content to the Windows clipboard.

Read More