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.

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