Ubuntu Tutorial

Install New Application : we need root privilege to install or remove packages and applications. there are many ways to install applications or packages. eg using apt, wget, ubuntu store, some external libraries like python3, pip3 etc. following are some ways to install applications or packages.

  1. Ubuntu Store : go to ubuntu store or use command gnome-software. and install the application you want.

    image
    install applications from ubuntu store

  2. Terminal : following are ways to install application or packages from terminal.

    1. Using apt : enter the application or package name into sudo apt-get install application/package name and execute command. you will see information about application. for example list of package, size need to application, additional disk space to allocate. and ask for confirm installation type y (yes) for installation or type n (no) for cancel.

      image
      install java(openjdk) using apt

    2. Using PPA : follow next 3 steps :

      • sudo add-apt-repository ppa:path-of-package : after this command it ask for confirmation press enter to confirm and ctrl + c to cancel.
      • sudo apt-get update
      • sudo apt-get install packagename

      image
      install java(openjdk) using ppa

    3. Using wget :

      • wget url : this download given package into system. if file is .deb file run next command. for other files we have follow different rules.
      • sudo apt-get install -f or sudo apt -f install : this will install downloaded deb package.

      image
      install google-chrome using wget

  3. Terminal (offline) : there are different types of package or application files eg deb package file . installation process is dependent on file type. package files contains README file. read README file before installation of package or program. it may help in installation of application or package.

    1. deb files : following are ways to install deb files.

      • using ubuntu store : open deb file location in file explorer > double click on deb file, ubuntu store will open > click on install button, installation will be started when installation is complete install button changes to remove button.

        image
        install deb package using ubuntu store

      • using terminal : to install .deb package or file from terminal follow next 2 steps.

        • sudo dpkg -i path-to-deb-file : -i means install
        • sudo apt-get install -f : -f or --fix-broken means attempt to correct a system with broken dependencies in place

        image
        install deb package using terminal

    2. tar.gz files : follow the next steps.

      • tar -xzf archive-name.tar.gz
      • cd archive-name
      • ./configure
      • make
      • sudo make install

Removing or Uninstalling Applications Or Packages : following are ways to uninstall or remove the application.

  1. Using Ubuntu Store : go to ubuntu store or use command gnome-software > select option installed > click on application that you want to uninstall or remove > click on remove button

    image
    remove package or application using ubuntu store

  2. Using apt : follow next steps.

    • sudo apt-get remove package-name : this will remove binaries.
    • sudo apt-get purge package-name or sudo apt-get remove --purge package-name : it will remove everything (installation files,configuration files,etc) except dependency.
    • above 2 commands will remove application or package. in following command we will clean the local repository. this will also free or clean the memory.

    • sudo apt-get clean : clears out the local repository of retrieved package files
    • sudo apt-get autoclean : it is like clean. but it only removes package files that can no longer to be downloaded, and are largely useless.

    image
    remove package or application using terminal

  3. Using dpkg : use following commands.

    • sudo dpkg -r package-name : -r means for remove.
    • sudo dpkg -P package-name : -P means purge an installed or already removed package.
    • OR you can use next command, but it will force package or application to uninstall.

    • sudo dpkg --purge --force-all package-name : purge an installed or already removed package and force to uninstall or remove.

    image
    remove package or application using dpkg command