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.

86 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 -y remove mongodb subversion filezilla nodejs php mysql-repo.rpm mysql-community-server
  42. sudo semanage port -d -t mongod_port_t -p tcp 27017
  43. # WARNING --> port 27017 must be tested to make sure the above line of code closes it
  44. ;;
  45. "NSSA/CIT")
  46. echo -e "Welcome to the TigerOS NSSA/CIT package removal script.\n
  47. This script will remove wireshark, python 2.7, python 3, and jGrasp from your machine."
  48. while true; do
  49. read -p "Do you wish to continue [y/n] " yn
  50. case $yn in
  51. [Yy]* ) break;;
  52. [Nn]* ) exit;;
  53. esac
  54. done
  55. sudo dnf -y remove wireshark python python3
  56. # WARNING --> jGrasp has not been implemented in the installer script yet. Cannot remove
  57. echo "Install finished."
  58. exit
  59. ;;
  60. "SE" )
  61. echo -e "Welcome to the TigerOS Software Engineering removal script.\n
  62. This script will remove ruby, eclipse, Spin, sqlite3 and MIT Alloy from your machine."
  63. while true; do
  64. read -p "Do you wish to continue? [y/n] " yn
  65. case $yn in
  66. [Yy]* ) break;;
  67. [Nn]* ) exit;;
  68. esac
  69. done
  70. sudo dnf -y remove eclipse-jdt ruby sqlite
  71. # Spin and Alloy need to be implemented in installer script before removal.
  72. echo "All files have been removed."
  73. exit
  74. ;;
  75. "Quit")
  76. break
  77. ;;
  78. *)
  79. echo "Invalid Option."
  80. ;;
  81. esac
  82. done