Seiden Group
Modern Development & Open Source for IBM i
  • Link to LinkedIn
  • Link to Mail
  • Home
  • Seiden PHP+
    • Seiden PHP+
    • Install & Learn
    • SmartSupport
    • PHP Migrations & Upgrades
    • Success Stories
    • Free PHP Assessment
    • Documentation
    • What’s New (Changelog)
  • IBM i Services
    • Development
    • Training & Mentoring
    • Open Source Setup & Upgrades
    • SSL/TLS Install & Learn
    • Performance
  • Support
    • Open Source & PHP
    • VS Code for i
    • Developer Support
    • Support Success Stories
  • VS Code for i
    • Support
    • Training
    • Code for i Resource Guide
    • Getting Started Videos
    • Code for IBM i Fridays
  • Free Stuff
    • IBM i Strategy & Tips
    • PHP Upgrade Assessment
    • CNX Valence Assessment
    • VS Code for IBM i Resources
    • Code for IBM i Fridays
    • QCachegrind Download
    • PHP Toolkit for IBM i Resources
    • Qshell on i Library
  • Blog
  • About
    • About Our Team
    • About Alan Seiden
    • Speakers & Sessions
    • In the News
  • Contact
  • 201.447.2437
  • Search
  • Menu Menu

Seiden Group Blog

Be Careful When Using Yum Remove

August 9, 2022/0 Comments/in PHP /by Alan Seiden

Open SourceThe Yum install command installs open source packages. It also installs any sub-packages upon which the desired package relies.

Yum remove does the reverse. It will remove a requested package.

What some users don’t know: Yum remove also removes any packages that depend on the package you removed. This is true whether running Yum manually or via the ACS open source package manager.

For example, removing Python3 also removes packages that depend on it. The Yum command to remove Python3 is:

yum remove python3

In addition to removing Python3, the command above would attempt to remove nodejs14 and other dependent packages. Yum knows that those packages could not function without Python3.

Read the warnings before hitting “y”

Yum does warn of all changes before making them. For example, here is a portion of the output from yum remove python3, naming the dependent packages that would also be “erased” when removing Python3.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Loaded plugins: changelog
Setting up Remove Process
Resolving Dependencies
---> Package python3.ppc64 0:3.6.15-1 will be erased
---> Package nodejs14.ppc64 0:14.19.1-1 will be erased
---> Package nodejs16.ppc64 0:16.14.2-1 will be erased
...
---> Package php-ibm_db2.ppc64 0:2.1.5-0seiden8.1 will be erased
---> Package php-pdo_ibm.ppc64 0:1.5.0-0seiden8.1 will be erased
--> Finished Dependency Resolution
 
Dependencies Resolved
 
...
 
Transaction Summary
==========================================================================================================
Remove 40 Packages
 
Installed size: 808 M
Is this ok [y/N]: n

Users who did not scrutinize the warnings, quickly typing “y” (yes) at Is this ok, could unintentionally lose nodejs14, nodejs16, and two PHP extensions.

Review before you remove

Running the --whatrequires rpm option can tell you which packages depend directly on the package you are removing. The command for our Python3 example would be:

rpm -q --whatrequires python3

This will give you a partial list of dependent packages, but might not be complete, because those packages may be dependencies of yet other packages. At least you’d know to pay attention to the “will be erased” messages.

The safest approach is to scrutinize any “will be erased” messages when doing a removal. Make sure you can live with the erasures before you type “y.”

How to undo a Yum command

If you accidentally remove packages using Yum, you can go back using the Yum history commands:

  • Yum history info: See the list of packages affected by your last command
  • Yum history undo last: Undo your last Yum command (you’ll get a confirmation prompt first)

For more information on Yum history options, including rolling back Yum transactions, see How to view Yum transaction history and How to undo or roll back Yum transactions.

Tags: IBMiOSS, RPM, Yum
Share this entry
  • Share on Facebook
  • Share on X
  • Share on Pinterest
  • Share on LinkedIn
  • Share on Tumblr
  • Share on Reddit
  • Share by Mail
https://www.seidengroup.com/wp-content/uploads/2017/03/SeidenLogo-180.png 0 0 Alan Seiden https://www.seidengroup.com/wp-content/uploads/2017/03/SeidenLogo-180.png Alan Seiden2022-08-09 09:03:012022-11-15 16:52:32Be Careful When Using Yum Remove
Alan Seiden

About Alan Seiden

Alan works to preserve your investment in IBM enterprise systems by designing and implementing modernization strategies that leverage your existing business logic.

With a passion ...Read More

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

SUBSCRIBE
Open Thinking
Monthly IBM i Strategy & Tips
  • This field is for validation purposes and should be left unchanged.

IBM i Development

  • RPG, COBOL, SQL, Node,
    PHP, Python, Valance, etc.
  • Modernization. Integration.
  • Web and API Solutions
  • Legacy Maintenance
    ...
LET'S GET IT DONE!

Recent Posts

  • Do You Need IBM i Observability?
  • PHP 8.6 is Coming Soon to IBM i
  • Safer npm installation is on the way for Node.js (and all JavaScript)
  • Access Modern Security for IBM i and Connected Web Environments
  • IBM i: A Natural Platform for Agentic AI
  • PHP on IBM i in 2026: The Modernization Engine
  • Your “AS/400” Is a Modern IBM i Platform
  • MCP + AI for IBM i Teams (with a MongoDB example)
  • GnuPG PHP Extension for IBM i: Now Included with Seiden Support
  • Getting Started with Code for IBM i: A Lunch & Learn Video

SEIDEN GROUP: Modern Development & Open Source for IBM i

Home   |   Seiden PHP+   |   IBM i Services  |   Support   |   VS Code for i   |   Free Stuff   |   Blog  |   Privacy Policy  |   Contact         201.447.2437

© 2026 Seiden Group, LLC
  • Link to LinkedIn
  • Link to Mail
Link to: Requests for Enhancement are now “IBM Ideas” Link to: Requests for Enhancement are now “IBM Ideas” Requests for Enhancement are now “IBM Ideas” Link to: IT Leadership Summit on Security — A Recap Link to: IT Leadership Summit on Security — A Recap IT Leadership Summit on Security — A Recap
Scroll to top Scroll to top Scroll to top