InfinityQuest - Programming Code Tutorials and Examples with Python, C++, Java, PHP, C#, JavaScript, Swift and more

Menu
  • Home
  • Sitemap

Python Programming Language Best Tutorials and Code Examples

Learn Python Right Now!
Home
PHP
Uninstalling PEAR Packages in PHP
PHP

Uninstalling PEAR Packages in PHP

InfinityCoder December 27, 2016

You wish to remove a PEAR package from your system.

The uninstall command tells the PEAR installer to delete packages:

1
2
3
4
5
% php pyrus.phar uninstall pear/XML_Beautifier
 
Pyrus version 2.0.0a4 SHA-1: 72271D92C3AA1FA96DF9606CD538868544609A52
Using PEAR installation found at /Users/rasmus/lib
Uninstalled pear.php.net/XML_Beautifier

Uninstalling a package removes it completely from your system. If you want to reinstall it, you must begin as if the package was never installed.
If you try to remove a package that another package depends on, Pyrus will warn you and halt the uninstall process.

For example, take a look at a sample PEAR installation:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
% sudo php pyrus.phar list-packages
 
Pyrus version 2.0.0a4 SHA-1: 72271D92C3AA1FA96DF9606CD538868544609A52
Using PEAR installation found at /Users/rasmus/lib
Listing installed packages [/Users/rasmus/lib]:
[channel pear.php.net]:
Archive_Tar 1.3.7 stable
Console_Getopt 1.3.0 stable
HTTP2 1.1.1 stable
PEAR 1.9.4 stable
Structures_Graph 1.0.4 stable
XML_Beautifier 1.2.1 stable
XML_Parser 1.3.4 stable
XML_Parser2 0.1.0 beta
XML_RSS 1.0.2 stable
XML_SVG 1.1.0 stable
XML_Util 1.2.1 stable
XML_Util2 0.1.0 alpha

Now, try to uninstall the XML_Parser package:

1
2
3
4
5
6
7
8
9
% php pyrus.phar uninstall pear/XML_Parser
 
Pyrus version 2.0.0a4 SHA-1: 72271D92C3AA1FA96DF9606CD538868544609A52
Using PEAR installation found at /Users/rasmus/lib
Pyrus\Installer\Exception: Dependency validation failed for some installed
    packages, installation aborted
Pyrus\Dependency\Exception: channel://pear.php.net/XML_Parser (version >=
    1.0.1, excluded versions: 1.0.1) is required by installed package
    "channel://pear.php.net/XML_RSS"

You can still force a package that has dependencies to uninstall by using the -f flag or –force flag to instruct Pyrus to ignore dependencies and uninstall anyway.

Use this capability with caution.
There is no way to automatically roll back an upgrade to an earlier version of a package by using uninstall.
The short command for uninstall is un.

Share
Tweet
Email
Prev Article
Next Article

Related Articles

Editing a Resource in PHP
You want to let people update a resource. Accept requests …

Editing a Resource in PHP

Generating Biased Random Numbers in PHP
You want to generate random numbers, but you want these …

Generating Biased Random Numbers in PHP

About The Author

InfinityCoder
InfinityCoder

Leave a Reply

Cancel reply

Recent Tutorials InfinityQuest

  • Adding New Features to bash Using Loadable Built-ins in bash
    Adding New Features to bash Using Loadable …
    June 27, 2017 0
  • Getting to the Bottom of Things in bash
    Getting to the Bottom of Things in …
    June 27, 2017 0

Recent Comments

  • fer on Turning a Dictionary into XML in Python
  • mahesh on Turning a Dictionary into XML in Python

Categories

  • Bash
  • PHP
  • Python
  • Uncategorized

InfinityQuest - Programming Code Tutorials and Examples with Python, C++, Java, PHP, C#, JavaScript, Swift and more

About Us

Start learning your desired programming language with InfinityQuest.com.

On our website you can access any tutorial that you want with video and code examples.

We are very happy and honored that InfinityQuest.com has been listed as a recommended learning website for students.

Popular Tags

binary data python CIDR convert string into datetime python create xml from dict python dictionary into xml python how to create xml with dict in Python how to write binary data in Python IP Address read binary data python tutorial string as date object python string to datetime python

Archives

  • June 2017
  • April 2017
  • February 2017
  • January 2017
  • December 2016
  • November 2016
Copyright © 2021 InfinityQuest - Programming Code Tutorials and Examples with Python, C++, Java, PHP, C#, JavaScript, Swift and more
Programming Tutorials | Sitemap