Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

Is there any risk to delete old HDP directories?

avatar

Upgraded a cluster many times and current version is HDP 2.3.2

Would like to delete the following directories. Would it be safe to delete with rm command?

$ sudo du -hx --max-depth=1 /usr/hdp | grep G

2.8G /usr/hdp/2.3.2.0-2950

1.7G /usr/hdp/2.2.0.0-2041

2.0G /usr/hdp/2.2.6.0-2800

2.0G /usr/hdp/2.2.4.2-2

2.6G /usr/hdp/2.3.0.0-2557

...

1 ACCEPTED SOLUTION

avatar

You should not remove old packages by removing these folders via "rm -rf ....". There are many locations where HDP stores files, packages etc..

You can uninstall old versions for example via:

yum erase -y \*2_3_0_0_2557\*

Make sure you are not removing any current packages. Above command will remove the packages for the specified version, however you will still find some old log and config files (I usually keep them as a reference, but I think you can remove them without any problems).

View solution in original post

2 REPLIES 2

avatar

You should not remove old packages by removing these folders via "rm -rf ....". There are many locations where HDP stores files, packages etc..

You can uninstall old versions for example via:

yum erase -y \*2_3_0_0_2557\*

Make sure you are not removing any current packages. Above command will remove the packages for the specified version, however you will still find some old log and config files (I usually keep them as a reference, but I think you can remove them without any problems).

avatar

Thanks Jonas!

Based on your advise, I'll do "yum erase `yum list | grep -P '\b2.3.0.0-2557\b' | awk '{ print $1 }'`"