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.

93 lines
3.4 KiB

  1. #!/usr/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. # all dnf commands here are done with the -y flag. Individual removals do not ask the user for permission beforehand
  19. case $opt in
  20. "CS")
  21. echo -e "Welcome to the TigerOS CS package removal script.\n
  22. This script will remove Intellij idea, PyCharm, prolog, racket, and JFLAP from your machine."
  23. while true; do
  24. read -p "Do you wish to continue? [y/n] " yn
  25. case $yn in
  26. [Yy]* ) break;;
  27. [Nn]* ) exit;;
  28. esac
  29. done
  30. bash /usr/local/bin/cs/idea.sh --remove # removes Intellij IDEA
  31. bash /usr/local/bin/cs/logisim.sh --remove # removes logisim
  32. bash /usr/local/bin/cs/jflap.sh --remove # removes JFLAP
  33. echo "Removal finished."
  34. exit
  35. ;;
  36. "IT/WMC")
  37. echo -e "Welcome to the TigerOS IT/WMC package removal script.\n
  38. This script will remove mysql, mongodb, subversion, filezilla, and nodejs from your machine."
  39. while true; do
  40. read -p "Do you wish to continue? [y/n] " yn
  41. case $yn in
  42. [Yy]* ) break;;
  43. [Nn]* ) exit;;
  44. esac
  45. done
  46. sudo dnf -y remove mongodb subversion filezilla nodejs php mysql-repo.rpm mysql-community-server
  47. semanage port -d -t mongod_port_t -p tcp 27017
  48. firewall-cmd --del-port=22017/tcp --permanent && firewall-cmd --reload
  49. echo "Removal finished."
  50. exit
  51. ;;
  52. "NSSA/CIT")
  53. echo -e "Welcome to the TigerOS NSSA/CIT package removal script.\n
  54. This script will remove wireshark, python 2.7, and python 3 from your machine."
  55. while true; do
  56. read -p "Do you wish to continue [y/n] " yn
  57. case $yn in
  58. [Yy]* ) break;;
  59. [Nn]* ) exit;;
  60. esac
  61. done
  62. sudo dnf -y remove wireshark
  63. echo "Removal finished."
  64. exit
  65. ;;
  66. "SE" )
  67. echo -e "Welcome to the TigerOS Software Engineering removal script.\n
  68. This script will remove ruby, eclipse, Spin, sqlite3 and MIT Alloy from your machine."
  69. while true; do
  70. read -p "Do you wish to continue? [y/n] " yn
  71. case $yn in
  72. [Yy]* ) break;;
  73. [Nn]* ) exit;;
  74. esac
  75. done
  76. sudo dnf -y remove eclipse-jdt ruby sqlite gitk plantuml
  77. bash /usr/local/bin/se/spin.sh --remove
  78. bash /usr/local/bin/se/alloy.sh --remove
  79. echo "Removal finished."
  80. exit
  81. ;;
  82. "Quit")
  83. break
  84. ;;
  85. *)
  86. echo "Invalid Option."
  87. ;;
  88. esac
  89. done