Remove grafana from ubuntu 17.10 - grafana

I'm trying to un-install grafana 4.6.3 from Ubuntu 17.10, but is not possible. So far i have tried
sudo apt-get remove grafana , sudo apt-get remove --auto-remove grafana
and says Unable to locate package grafana.
Also tried to install it again from ubuntu software in order to unistall it properly but then pops me up an error message says: Unable to install grafana snap "graphana" is already installed. I installed it first time from ubuntu software.
What can i do to un-install it?

Have you tried dpkg?
sudo dpkg --remove --force-remove-reinstreq <packagename>
If apt won't remove it try using dpkg.
You could also try and clean up your apt utility.
sudo rm -rf /var/cache/apt/archives/<package_name.deb>
sudo apt-get autoclean
sudo apt-get update
sudo apt-get upgrade

Related

Try to install snapd but giving `conflicting requests` error

I am trying to install snapd but giving this error.
Operating System - Red Hat Enterprise Linux release 8.6 (Ootpa)
Error:
Problem: package snapd-2.57.6-2.el8.x86_64 requires snapd-selinux = 2.57.6-2.el8, but none of the providers can be installed
- conflicting requests
- nothing provides selinux-policy >= 3.14.3-108.el8 needed by snapd-selinux-2.57.6-2.el8.noarch
- nothing provides selinux-policy-base >= 3.14.3-108.el8 needed by snapd-selinux-2.57.6-2.el8.noarch
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
I have the same problem. There's a long discussion about this here: https://forum.snapcraft.io/t/trouble-installing-snapd-on-rhel-8/13140/2. It looks like the only way to do it, if you can install all the necessary build tools, is to build from sources, as one of the posts there suggests.(I couldn't do it on my system because it's having subscription management issues.)
I also tried using CR repository, as suggested in the instructions for CentOS here: https://snapcraft.io/docs/installing-snap-on-centos, but that didn't work for me, either (I guess it's really just for CentOS and not RHEL).
UPDATE:
I finally found a solution (where there's a will...)! I manually installed all the requirements, one by one, that weren't available in the epel-release repo. My process was the following:
wget https://rpmfind.net/linux/centos/8-stream/BaseOS/x86_64/os/Packages/rpm-4.14.3-19.el8.x86_64.rpm
wget https://rpmfind.net/linux/centos/8-stream/BaseOS/x86_64/os/Packages/rpm-libs-4.14.3-19.el8.x86_64.rpm
wget https://dl.rockylinux.org/pub/rocky/8/BaseOS/aarch64/os/Packages/s/selinux-policy-3.14.3-108.el8.noarch.rpm
sudo yum install http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages/libsemanage-2.9-9.el8.x86_64.rpm --allowerasing -y
sudo yum install http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages/policycoreutils-2.9-19.el8.x86_64.rpm -y
sudo rpm -i --force rpm-4.14.3-19.el8.x86_64.rpm
sudo rpm -i --force rpm-libs-4.14.3-19.el8.x86_64.rpm
sudo rpm -i --force selinux-policy-3.14.3-108.el8.noarch.rpm
sudo yum install http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages/python3-libsemanage-2.9-9.el8.x86_64.rpm -y
sudo yum install http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages/python3-policycoreutils-2.9-19.el8.noarch.rpm -y
sudo yum install http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages/policycoreutils-python-utils-2.9-19.el8.noarch.rpm -y
sudo yum install http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages/selinux-policy-minimum-3.14.3-108.el8.noarch.rpm -y
sudo yum install http://mirror.centos.org/centos/8-stream/BaseOS/x86_64/os/Packages/libseccomp-2.5.2-1.el8.x86_64.rpm -y
sudo yum install https://download-ib01.fedoraproject.org/pub/epel/8/Everything/x86_64/Packages/s/snapd-selinux-2.57.6-2.el8.noarch.rpm -y
sudo yum install snapd -y
sudo yum update snapd -y
It's conceivable that on your system something else will be missing. If you run into an error telling you that nothing provides package XYZ, you can find it here: https://centos.pkgs.org/8-stream/centos-baseos-x86_64/ and simply sudo yum install directly from the binary package URL; e.g.:
That's exactly what my process was, and here's what I have now:
$ cat /etc/redhat-release (base)
Red Hat Enterprise Linux release 8.2 (Ootpa)
$ snap --version (base)
snap 2.57.6-2.el8
snapd 2.52.1
series 16
rhel 8.2
kernel 4.18.0-193.6.3.el8_2.x86_64

Installing last libreoffice by apt-get

How to install the last LibreOffice version by the apt-get command? I ran the followed commands at a Ubuntu 16.04 and just got version 6.2.8.2 but the last official one is 6.4.
sudo apt-add-repository ppa:libreoffice/ppa
sudo apt update
sudo apt upgrade
sudo apt install libreoffice
Second the official developers, LibreOffice-official-version Ubuntu 16.04 should be 5.1.6~rc2-0ubuntu1~xenial10. Because I had manually added sudo apt-add-repository ppa:libreoffice/ppa I was able to got libreoffice 6.2.8.2.
To achieve the 6.4 and newer installation they recommend to download the package or simple use sudo snap install libreoffice.

How to remove mongodb on WSL ubuntu 18.04

I have a mongodb version 4.0, but I want to upgrade it into version 4.2. When I tried to upgrade it and checked the version it's still showing 4.0. Now I'm trying to remove it first, then install the version 4.2, but the problem now is I cannot remove it.
I tried removing it by deleting the folder data I'm using for mongodb and the mongod in the root.
I have tried some uninstall/remove script
sudo service mongod stop
sudo apt-get purge mongodb-org*
sudo rm -r /var/log/mongodb /var/lib/mongodb
apt-get remove --purge mongodb
apt-get autoremove --purge mongodb
I almost tried all the uninstall script but with no luck. I know some of you already encountered this situation and be able to enlightened me of what's going on.
These scripts fixed the problem for me, got it from another post
sudo apt-get install mongodb-org --fix-missing --fix-broken
sudo apt-get autoremove mongodb-org --fix-missing --fix-broken

How to upgrade Visual Studio Code editor?

What's the best way to upgrade Visual Studio Code on Linux Ubuntu?
For the time being I was periodically getting the newest version (.deb) from their official site: https://code.visualstudio.com/
sudo dpkg -i code_*.deb
Visual Studio Code enabled official Linux repositories on February 2017 (v1.10)
sudo add-apt-repository -y "deb https://packages.microsoft.com/repos/vscode stable main "
sudo apt update
sudo apt -y install code
You can upgrade / dist-upgrade as usual
sudo apt -y upgrade
sudo apt -y dist-upgrade
[1]: download the latest vscode (.deb) package to your computer on this
link :
https://go.microsoft.com/fwlink/?LinkID=760868
, or this there :
https://code.visualstudio.com/docs/
[2]: then open a terminal in the folder where you downloaded the .deb file and write:
sudo dpkg -i <the downloaded file>.deb
[3]: finally if you have apt-get do (if not install apt-get first):
sudo apt-get install -f
If you have installed it via the repository, exit VS Code then just do:
sudo apt update
sudo apt install code
This is the same command to install or upgrade to the latest version. You can see the version with:
code --version
Now the easiest and recommended way is to use snap:
sudo snap install --classic code
And updates are supposed to be automatic.
This works fine in ubuntu.
sudo apt-get update
sudo apt-get install code
When you install VSCode with the file .deb on Ubuntu 20.08, first, remove it:
sudo apt-get remove code
Add the repository in this link https://code.visualstudio.com/docs/setup/linux
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
sudo install -o root -g root -m 644 packages.microsoft.gpg /etc/apt/trusted.gpg.d/
sudo sh -c 'echo "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/packages.microsoft.gpg] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list'
Udate the package cache and reinstall
sudo apt-get install apt-transport-https
sudo apt-get update
sudo apt-get install code
In the next time when you want to upgrade, just do:
sudo apt-get update
sudo apt-get upgrade code
Because your repository is missing information to upgrade VSCode, the above solution will fix it.
This is what I did to avoid the annoying message:
Remove vscode, if you already installed it.
sudo apt-get remove code
Add repositories, update and install:
sudo add-apt-repository -y "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main "
sudo apt update
sudo apt -y install code
If you have already installed VS code, go to the terminal and type two different commands:
sudo apt update
sudo apt-get upgrade code
The following commands work for me (for Linux) :
wget 'https://code.visualstudio.com/sha/download?build=stable&os=linux-deb-x64' -O /tmp/code_latest_amd64.deb
sudo dpkg -i /tmp/code_latest_amd64.deb
Place those two commands into an executable Bash script called auto-update-VSCode, and you can simply run that from your shell any time Visual Studio Code says it's out of date.
I'm running Ubuntu 20.04 and this worked perfectly for me:
$ wget https://vscode-update.azurewebsites.net/latest/linux-deb-x64/stable -O /tmp/code_latest_amd64.deb
$ sudo dpkg -i /tmp/code_latest_amd64.deb
Best way to update Vscode in Ubuntu:
sudo apt-get update
sudo apt-get install code
sudo apt-get update
sudo apt-get install code

MongoDB - Ubuntu 15.04 missing packages

I've updated my Ubuntu 14.04 to the latest 15.04. Since then Mongo failed to run. can run the command mongo and it'll advise the version and so on but server will not run: sudo service mongod start as normal.
When I ran: sudo apt-get install -y mongodb-org it failed with the error in the screen shot below:
I completely purged mongo and re-installed, followed the instructions from here. However when I ran sudo apt-get update I noticed the below packages were 404'ing. See Screen shot below.
If anyone could shed any light on this would be great?
Following instructions from this page page http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/
but with slighty changed second step 2. Create a list file for MongoDB:
echo "deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list
I put trusty (code name for Ubuntu 14.04 LTS) instead of $(lsb_release -sc) which issues vivid as codename for 15.04
I see now that #Nail Lonergan already commented echo path change...
There is currently no build available for Ubuntu 15.04. Check this page for all builds: https://www.mongodb.org/downloads#development
After having heaps of issues, finally this is how I installed it,
Ubuntu 15.04
apt-get update
apt-get dist-upgrade
apt-get install -y mongodb
sudo apt-get install upstart-sysv
sudo service mongodb status
if not running
sudo service mongodb start
Install PHP Driver
sudo apt-get install php5-dev
sudo apt-get install build-essential
sudo pecl install mongo
https://sonnguyen.ws/install-mongodb-mongo-php-in-ubuntu/
sudo apt-get install mongodb
ps -ef|grep mongo
sudo pecl install mongo
sudo apt-get install php5-dev php5-cli php-pear