Fedora Remix maintained by the Rochester Institute of Technology (RIT) Linux Users Group, targeted at users new to Linux and RIT students, faculty, and staff
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

87 lines
3.2 KiB

  1. #!/bin/bash
  2. # TigerOS script for the removal of unwanted major-specific packages
  3. #Author: Tim Zabel <tjz8659@rit.edu>
  4. # Check to see if the current user is root
  5. if [ $EUID != 0 ]
  6. then
  7. echo "Please run this script as root (sudo $@$0)."
  8. exit
  9. fi
  10. echo -e "Welcome to the TigerOS package removal script.\n
  11. This script will remove all files and packages installed for a specific major."
  12. echo -e "\n"
  13. sleep 5;
  14. PS3='Please enter the major for the courses you wish to remove: '
  15. options=("CS" "IT/WMC" "NSSA/CIT" "SE" "Quit")
  16. select opt in "${options[@]}"
  17. do
  18. case $opt in
  19. "CS")
  20. echo -e "Welcome to the TigerOS CS package removal script.\n
  21. This script will remove Intellij idea, PyCharm, prolog, racket, and JFLAP from your machine."
  22. while true; do
  23. read -p "Do you wish to continue? [y/n] " yn
  24. case $yn in
  25. [Yy]* ) break;;
  26. [Nn]* ) exit;;
  27. esac
  28. done
  29. # removal script cannot be done without the installer script implementing this section.
  30. ;;
  31. "IT/WMC")
  32. echo -e "Welcome to the TigerOS IT/WMC package removal script.\n
  33. This script will remove mysql, mongodb, subversion, filezilla, and nodejs from your machine."
  34. while true; do
  35. read -p "Do you wish to continue? [y/n] " yn
  36. case $yn in
  37. [Yy]* ) break;;
  38. [Nn]* ) exit;;
  39. esac
  40. done
  41. sudo dnf remove mongodb subversion filezilla nodejs php mysql-repo.rpm mysql-community-server
  42. semanage port -d -t mongod_port_t -p tcp 27017
  43. firewall-cmd --del-port=22017/tcp --permanent && firewall-cmd --reload
  44. # jGrasp installer script must be implemented before it can be removed.
  45. ;;
  46. "NSSA/CIT")
  47. echo -e "Welcome to the TigerOS NSSA/CIT package removal script.\n
  48. This script will remove wireshark, python 2.7, python 3, and jGrasp from your machine."
  49. while true; do
  50. read -p "Do you wish to continue [y/n] " yn
  51. case $yn in
  52. [Yy]* ) break;;
  53. [Nn]* ) exit;;
  54. esac
  55. done
  56. sudo dnf remove wireshark python python3
  57. # WARNING --> jGrasp has not been implemented in the installer script yet. Cannot remove
  58. echo "Install finished."
  59. exit
  60. ;;
  61. "SE" )
  62. echo -e "Welcome to the TigerOS Software Engineering removal script.\n
  63. This script will remove ruby, eclipse, Spin, sqlite3 and MIT Alloy from your machine."
  64. while true; do
  65. read -p "Do you wish to continue? [y/n] " yn
  66. case $yn in
  67. [Yy]* ) break;;
  68. [Nn]* ) exit;;
  69. esac
  70. done
  71. sudo dnf remove eclipse-jdt ruby sqlite
  72. # Spin and Alloy need to be implemented in installer script before removal.
  73. echo "All files have been removed."
  74. exit
  75. ;;
  76. "Quit")
  77. break
  78. ;;
  79. *)
  80. echo "Invalid Option."
  81. ;;
  82. esac
  83. done