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.

89 lines
3.3 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. ./usr/local/tigeros/cs/idea.sh --remove # removes Intellij IDEA
  31. ./usr/local/tigeros/cs/logisim.sh --remove # removes logisim
  32. ./usr/local/tigeros/cs/jflap.sh --remove # removes JFLAP
  33. ;;
  34. "IT/WMC")
  35. echo -e "Welcome to the TigerOS IT/WMC package removal script.\n
  36. This script will remove mysql, mongodb, subversion, filezilla, and nodejs from your machine."
  37. while true; do
  38. read -p "Do you wish to continue? [y/n] " yn
  39. case $yn in
  40. [Yy]* ) break;;
  41. [Nn]* ) exit;;
  42. esac
  43. done
  44. sudo dnf -y remove mongodb subversion filezilla nodejs php mysql-repo.rpm mysql-community-server
  45. semanage port -d -t mongod_port_t -p tcp 27017
  46. firewall-cmd --del-port=22017/tcp --permanent && firewall-cmd --reload
  47. ;;
  48. "NSSA/CIT")
  49. echo -e "Welcome to the TigerOS NSSA/CIT package removal script.\n
  50. This script will remove wireshark, python 2.7, and python 3 from your machine."
  51. while true; do
  52. read -p "Do you wish to continue [y/n] " yn
  53. case $yn in
  54. [Yy]* ) break;;
  55. [Nn]* ) exit;;
  56. esac
  57. done
  58. sudo dnf -y remove wireshark
  59. echo "Install finished."
  60. exit
  61. ;;
  62. "SE" )
  63. echo -e "Welcome to the TigerOS Software Engineering removal script.\n
  64. This script will remove ruby, eclipse, Spin, sqlite3 and MIT Alloy from your machine."
  65. while true; do
  66. read -p "Do you wish to continue? [y/n] " yn
  67. case $yn in
  68. [Yy]* ) break;;
  69. [Nn]* ) exit;;
  70. esac
  71. done
  72. sudo dnf -y remove eclipse-jdt ruby sqlite gitk plantuml
  73. ./usr/local/tigeros/se/spin.sh --remove
  74. ./usr/local/tigeros/se/alloy.sh --remove
  75. echo "All files have been removed."
  76. exit
  77. ;;
  78. "Quit")
  79. break
  80. ;;
  81. *)
  82. echo "Invalid Option."
  83. ;;
  84. esac
  85. done