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.

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