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.

96 lines
3.4 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. echo "Removal finished."
  53. exit
  54. ;;
  55. "NSSA/CIT")
  56. echo -e "Welcome to the TigerOS NSSA/CIT package removal script.\n
  57. This script will remove wireshark, python 2.7, and python 3 from your machine."
  58. echo
  59. while true; do
  60. read -p "Do you wish to continue [y/n] " yn
  61. case $yn in
  62. [Yy]* ) break;;
  63. [Nn]* ) exit;;
  64. esac
  65. done
  66. sudo dnf -y remove wireshark --ignore-missing
  67. echo "Removal finished."
  68. exit
  69. ;;
  70. "SE" )
  71. echo -e "Welcome to the TigerOS Software Engineering removal script.\n
  72. This script will remove ruby, eclipse, Spin, sqlite3 and MIT Alloy from your machine."
  73. echo
  74. while true; do
  75. read -p "Do you wish to continue? [y/n] " yn
  76. case $yn in
  77. [Yy]* ) break;;
  78. [Nn]* ) exit;;
  79. esac
  80. done
  81. sudo dnf -y remove eclipse-jdt ruby sqlite gitk plantuml --ignore-missing
  82. bash /usr/local/bin/se/spin.sh --remove
  83. bash /usr/local/bin/se/alloy.sh --remove
  84. echo "Removal finished."
  85. exit
  86. ;;
  87. "Quit")
  88. break
  89. ;;
  90. *)
  91. echo "Invalid Option."
  92. ;;
  93. esac
  94. done