Need native support for VS Code through swupd

Being Optimised for CPU Clear Linux is a great choice for development but come on guys where is VS Code - Its an essential editor for developers, yeah I know it is available in flatpak but it doesn’t run in native terminal and there is a container overhead so please bring VS Code to swupd


not likely to ship this due to license issue.

There is an open source version, but I don’t know if we can call it “VScode” or whether we’d need to call it something else. Having someone try and autospec it would be helpful, too :).

I use , VSCode clone with disabled MS telemetry.

How to install:

# swupd bundle-add dnf
# rpm -ivh --nodeps

It works, swupd shows no conflicts, system upgrade works too. Also easy update/remove with rpm.


As much as I’d like Intel to offer VSCode, it doesn’t appear to be possible with licensing? Until then, i just download and install. Works fine even though it’s outside of swupd.

Here is a shell script you can use to install the VSCode rpm.


# delete previous version if needed
if [ -d "$INSTALL_DIR" ]; then
	echo "deleting: $INSTALL_DIR"
	sudo rm -rf $INSTALL_DIR

# download the rpm from

sudo swupd bundle-add cpio package-utils

sudo rpm2cpio code-*.rpm | ( cd /; cpio -idv)


sudo echo "fs.inotify.max_user_watches=524288" | sudo tee --append /etc/sysctl.conf

How do the solutions by @rana and @paulcarroty compare?
More generally, what should be checked before installing an RPM on CLR? What is the preferred place to get RPMs? Any preferred distro to get RPMs from?

Very dirty solution. After next release & next unpack old files will exists, and you get something like Slackware in your system. RPM provide cleanup and file conflicts resolver.

@EddyValiant maybe try each approach and see what works best for you. I like to get the latest full version from Microsoft. Its got the latest goodies and works fine. I added a delete previous version section to the script. You would have to manually download the latest VSCode version and re-run the script. Am not familiar enough with VSCodium to comment. I also use the rpm2cpio to install Google Chrome which works great too. It is a less than ideal solution until Intel or someone provides a better one. swupd would be the obviously desired choice.

@paulcarroty Thanks for pointing out that a new install would overwrite. I updated the install script to delete previous version. Any thoughts on a cleaner way?

Google Chrome install script.


swupd bundle-add package-utils cpio wget
# wget
rpm2cpio google-chrome*.rpm | ( cd /; sudo cpio -idv)

LN='export FONTCONFIG_PATH=/usr/share/defaults/fonts'
sudo touch $ENV_FLE
if ! grep -q "$LN" $ENV_FLE ; then 
	sudo echo $LN >> $ENV_FLE

You can have these

[ -f google-chrome-stable_current_x86_64.rpm ] || wget
rpm2cpio google-chrome*.rpm | ( cd /; cpio -idv)

This will download the latest stable rpm if it’s not found.

1 Like

Thanks, nice addition

Here is another script to install using deb package. It will install the target at ~/ and auto-modify and create desktop links. To remove just delete ~/VisualStudioCode


#PS4=’$LINENO: ’
#set -x


echo Visual Studio Code updater

echo -e “Local version\t: $LOCAL_VERSION”

#Check version on remote
REMOTE_VERSION=$(curl -s -L | grep -Po ‘(?<=strong>Update )[^:]+’ | grep -oP ‘[^]+’)
echo -e “Remote version\t: $REMOTE_VERSION”

if [ “$REMOTE_VERSION” == “$LOCAL_VERSION” ]; then
echo “No update available”

read -sp "Enter to update, Ctrl-C to abort… " && echo

echo Downloading …
TMPWORK=$(mktemp -d)
cd TMPWORK wget -q --show-progress{REMOTE_VERSION}/linux-deb-x64/stable -O code_${REMOTE_VERSION}_amd64.deb

echo Extracting …
ar x code_${REMOTE_VERSION}_amd64.deb data.tar.xz

rm -rf $DEST
mkdir $DEST
bsdtar -xf data.tar.xz -C $DEST

#adjust path
sed -e “s%/usr/share/code/code%{DEST}/usr/share/code/code%" -e "s%Icon=com.visualstudio.code%Icon={DEST}/usr/share/pixmaps/com.visualstudio.code.png%” ${DEST}/usr/share/applications/code.desktop > ~/.local/share/applications/code.desktop

#create a link at Desktop for easy access
ln -sf ~/.local/share/applications/code.desktop ~/Desktop/code.desktop

#Store version

rm -rf $TMPWORK
echo Done.

[ (pgrep -c -f {DEST}/usr/share/code/code) -gt 0 ] && echo “Restart Visual Studio Code to use the latest version.”


swupd repair --picky will remove any files not shipped by Clear Linux

Please use /usr/local for any non-distro packages.

swupd won’t touch /usr/local.


I suggest to add sudo sysctl-p after modifying fs.inotify.max_user_watches value. So the new value is reloaded in current session.

1 Like

@doct0rHu @miguelinux @hong.wei.phang Thank you for the script improvements; much appreciated